======= Proxies ======= Use case ======== The backend of the application needs to perform HTTP/HTTPS GET requests in order to fetch WFS/WMS streams. If the server on which the stack is deployed needs a proxy to access the internet, you need to set up the application so it uses that proxy. Configuration ============= You need to setup your proxies (HTTP_PROXY and HTTPS_PROXY) inside the backend `/app/instance/config.py` configuration file. Here is an example. .. literalinclude:: config.py :language: python Now you need simply to mount your configuration file in the backend container. Here is how to do it in the `docker-compose.yml`: .. literalinclude:: docker-compose.yml :language: yaml .. warning:: If you mount the `instance/config.py` to `/app/instance/config.py` this way when initializing your application the first time, it will use it verbatim, bypassing the configuration from environment variables. So you better initialize it first with the default installation method, then copy it on your host system and override the proxy config, before changing the `docker-compose.yml`. Otherwise you'll use the default placeholder security settings which is not ideal in a production environment. One way to do it is to simply run the backend container alone with the configuration script: .. code:: bash docker run --rm --entrypoint /app/configure-backend.sh \ -e DB_URI=postgresql://aileron:pass@database/aileron \ -e CELERY_BROKER_URL=redis://redis:6379/0 \ -v ./instance:/app/instance \ registry.gitlab.com/decide.imt-atlantique/deseasion/backend:latest This will create the file `instance/config.py` on your system. You can provide the environment variables for the configuration script with `-e` options.