dosubot[bot] commented on issue #30059:
URL: https://github.com/apache/superset/issues/30059#issuecomment-2321159784
<!-- Answer -->
To configure `docker compose` for Superset to work behind a proxy, you can
set the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in
the `docker-compose.yml` file. This is similar to using `--build-arg
HTTP_PROXY` with `docker build` and setting `NO_PROXY` with `docker run`.
Here is how you can modify the `docker-compose.yml` file to include these
environment variables:
```yml
services:
nginx:
image: nginx:latest
container_name: superset_nginx
restart: unless-stopped
ports:
- "80:80"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
environment:
- HTTP_PROXY=http://your-proxy:port
- HTTPS_PROXY=http://your-proxy:port
- NO_PROXY=localhost,127.0.0.1
redis:
image: redis:7
container_name: superset_cache
restart: unless-stopped
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis:/data
environment:
- HTTP_PROXY=http://your-proxy:port
- HTTPS_PROXY=http://your-proxy:port
- NO_PROXY=localhost,127.0.0.1
db:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: postgres:15
container_name: superset_db
restart: unless-stopped
ports:
- "127.0.0.1:5432:5432"
volumes:
- db_home:/var/lib/postgresql/data
- ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
environment:
- HTTP_PROXY=http://your-proxy:port
- HTTPS_PROXY=http://your-proxy:port
- NO_PROXY=localhost,127.0.0.1
superset:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
build:
<<: *common-build
container_name: superset_app
command: ["/app/docker/docker-bootstrap.sh", "app"]
restart: unless-stopped
ports:
- 8088:8088
extra_hosts:
- "host.docker.internal:host-gateway"
user: *superset-user
depends_on: *superset-depends-on
volumes: *superset-volumes
environment:
- HTTP_PROXY=http://your-proxy:port
- HTTPS_PROXY=http://your-proxy:port
- NO_PROXY=localhost,127.0.0.1
- CYPRESS_CONFIG="${CYPRESS_CONFIG:-}"
# Repeat the environment settings for other services as needed
```
Replace `http://your-proxy:port` with the actual proxy URL and port you are
using. This configuration will ensure that all the services in your
`docker-compose.yml` file are aware of the proxy settings
<sup>[[1]](https://github.com/apache/superset/blob/master/docker-compose.yml)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]