mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
docs: add always pull to docker commands
This commit is contained in:
parent
7fdb53f664
commit
6f062e4d66
@ -204,10 +204,7 @@ The easiest way to run unleash locally is using [docker](https://www.docker.com/
|
|||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
Each container that runs in your local Docker instance must have a
|
Each container that runs in your local Docker instance must have a unique name. If you've run these commands before, you can either start the containers again (`docker start ${CONTAINER_NAME}`) or remove them (`docker rm ${CONTAINER_NAME}`) and run the commands again.
|
||||||
unique name. If you've run these commands before, you can either start
|
|
||||||
the containers again (`docker start ${CONTAINER_NAME}`) or remove them
|
|
||||||
(`docker rm ${CONTAINER_NAME}`) and run the commands again.
|
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -236,7 +233,7 @@ docker run \
|
|||||||
-e DATABASE_SSL=false \
|
-e DATABASE_SSL=false \
|
||||||
--network unleash \
|
--network unleash \
|
||||||
--name unleash \
|
--name unleash \
|
||||||
unleashorg/unleash-server
|
--pull=always unleashorg/unleash-server
|
||||||
```
|
```
|
||||||
|
|
||||||
[Click here to see all options to get started locally.](deploy/getting-started.md)
|
[Click here to see all options to get started locally.](deploy/getting-started.md)
|
||||||
@ -252,74 +249,55 @@ password: unleash4all
|
|||||||
|
|
||||||
### Run Unleash and the Unleash proxy with Docker
|
### Run Unleash and the Unleash proxy with Docker
|
||||||
|
|
||||||
Follow steps outlined in the [Run Unleash with
|
Follow steps outlined in the [Run Unleash with Docker](#run-unleash-with-docker) section to get the Unleash instance up and running. Once you have done that you need to first get an API key from your Unleash instance and then use that API key when starting the Unleash proxy.
|
||||||
Docker](#run-unleash-with-docker) section to get the Unleash instance
|
|
||||||
up and running. Once you have done that you need to first get an API
|
|
||||||
key from your Unleash instance and then use that API key when starting
|
|
||||||
the Unleash proxy.
|
|
||||||
|
|
||||||
1. Get an API key.
|
1. Get an API key.
|
||||||
|
|
||||||
To get an API key, access your Unleash instance in a web browser.
|
To get an API key, access your Unleash instance in a web browser. First, navigate to the API access screen.
|
||||||
First, navigate to the API access screen.
|
|
||||||
|
|
||||||
![The Unleash UI showing a dropdown menu under the "Configure" menu
|
![The Unleash UI showing a dropdown menu under the "Configure" menu
|
||||||
entry. The dropdown menu's "API Access" option is highlighted and
|
entry. The dropdown menu's "API Access" option is highlighted and
|
||||||
you're told to navigate there.](/img/api_access_navigation.png
|
you're told to navigate there.](/img/api_access_navigation.png 'Navigate to the API access page.')
|
||||||
"Navigate to the API access page.")
|
|
||||||
|
|
||||||
Next, create an API key with these details
|
Next, create an API key with these details
|
||||||
|
|
||||||
- **name:** proxy-key (this can be whatever you want)
|
- **name:** proxy-key (this can be whatever you want)
|
||||||
- **token type:** client
|
- **token type:** client
|
||||||
- **project:** all
|
- **project:** all
|
||||||
- **environment:** select your preferred environment (this option is
|
- **environment:** select your preferred environment (this option is only available in Unleash 4.3 and later)
|
||||||
only available in Unleash 4.3 and later)
|
|
||||||
|
|
||||||
Copy the API key to your clipboard. You'll need it in the next step.
|
Copy the API key to your clipboard. You'll need it in the next step.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
Depending on whether you have the environments feature
|
Depending on whether you have the environments feature enabled or not, the API key will look a little different. If you don't have environments enabled, it'll just be a 64 character long hexadecimal string (for instance `be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178`). If you do have environments enabled, the key will be prefixed with the project and the environment that the key is valid for. It'll use the format `<project>:<environment>.<key>`, e.g. `demo-app:production.be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178`.
|
||||||
enabled or not, the API key will look a little different. If you
|
|
||||||
don't have environments enabled, it'll just be a 64 character long
|
|
||||||
hexadecimal string (for instance
|
|
||||||
`be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178`).
|
|
||||||
If you do have environments enabled, the key will be prefixed with
|
|
||||||
the project and the environment that the key is valid for. It'll use the
|
|
||||||
format `<project>:<environment>.<key>`, e.g.
|
|
||||||
`demo-app:production.be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178`.
|
|
||||||
|
|
||||||
Regardless of which format your string uses, do not modify it.
|
Regardless of which format your string uses, do not modify it.
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
2. Start the Unleash proxy
|
2. Start the Unleash proxy
|
||||||
|
|
||||||
Start a container with the Unleash proxy by running the following
|
Start a container with the Unleash proxy by running the following command. Replace `${API_KEY}` with the key you created in the following step.
|
||||||
command. Replace `${API_KEY}` with the key you created in the
|
|
||||||
following step.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run \
|
docker run \
|
||||||
-e UNLEASH_PROXY_SECRETS=some-secret \
|
-e UNLEASH_PROXY_SECRETS=some-secret \
|
||||||
-e UNLEASH_URL='http://unleash:4242/api/' \
|
-e UNLEASH_URL='http://unleash:4242/api/' \
|
||||||
-e UNLEASH_API_TOKEN='${API_KEY}' \
|
-e UNLEASH_API_TOKEN='${API_KEY}' \
|
||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
--network unleash \
|
--network unleash \
|
||||||
--name unleash-proxy \
|
--name unleash-proxy \
|
||||||
unleashorg/unleash-proxy
|
--pull=always unleashorg/unleash-proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Test the proxy
|
3. Test the proxy
|
||||||
|
|
||||||
To make sure the proxy is running successfully, you can test it by
|
To make sure the proxy is running successfully, you can test it by running the following command:
|
||||||
running the following command:
|
|
||||||
|
|
||||||
```curl
|
```curl
|
||||||
curl http://localhost:3000/proxy -H "Authorization: some-secret"
|
curl http://localhost:3000/proxy -H "Authorization: some-secret"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create your first toggle
|
### Create your first toggle
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user