Skip to content

Commit

Permalink
Rename env var script
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinuslu committed Aug 1, 2024
1 parent 88bb43d commit 9cf418e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ FROM nginx:stable-alpine as runner
WORKDIR /app

COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY ./nginx/replace-api-url.sh /docker-entrypoint.d/50-replace-api-url.sh
COPY ./nginx/replace-env-vars.sh /docker-entrypoint.d/50-replace-env-vars.sh
COPY --from=builder /app/build/ /app/

LABEL org.opencontainers.image.title="saleor/saleor-dashboard" \
org.opencontainers.image.description="A GraphQL-powered, single-page dashboard application for Saleor." \
org.opencontainers.image.url="https://saleor.io/" \
org.opencontainers.image.source="https://github.com/saleor/saleor-dashboard" \
org.opencontainers.image.revision="$COMMIT_ID" \
org.opencontainers.image.version="$PROJECT_VERSION" \
org.opencontainers.image.authors="Saleor Commerce (https://saleor.io)" \
org.opencontainers.image.licenses="BSD 3"
LABEL \
org.opencontainers.image.title="saleor/saleor-dashboard" \
org.opencontainers.image.description="A GraphQL-powered, single-page dashboard application for Saleor." \
org.opencontainers.image.url="https://saleor.io/" \
org.opencontainers.image.source="https://github.com/saleor/saleor-dashboard" \
org.opencontainers.image.revision="$COMMIT_ID" \
org.opencontainers.image.version="$PROJECT_VERSION" \
org.opencontainers.image.authors="Saleor Commerce (https://saleor.io)" \
org.opencontainers.image.licenses="BSD 3"
4 changes: 2 additions & 2 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Enter `http://localhost:8080/` to use the dashboard.
If you want to change `API_URL` in runtime, you can use (assuming you have a running container named `saleor-dashboard`):

```shell
docker exec -it -e API_URL=NEW_URL saleor-dashboard /docker-entrypoint.d/50-replace-api-url.sh
docker exec -it -e API_URL=NEW_URL saleor-dashboard /docker-entrypoint.d/50-replace-env-vars.sh
```

The replacement is not limited to `API_URL` only. You can also replace other environment variables in the same way.
Expand All @@ -30,7 +30,7 @@ docker exec -it \
-e "APPS_TUNNEL_URL_KEYWORDS=NEW_APPS_TUNNEL_URL_KEYWORDS" \
-e "IS_CLOUD_INSTANCE=NEW_IS_CLOUD_INSTANCE" \
-e "LOCALE_CODE=NEW_LOCALE_CODE" \
saleor-dashboard /docker-entrypoint.d/50-replace-api-url.sh
saleor-dashboard /docker-entrypoint.d/50-replace-env-vars.sh
```

Of course you can also provide all the environment variables at the `docker run` command:
Expand Down
File renamed without changes.

0 comments on commit 9cf418e

Please sign in to comment.