0
I have the following code snippet in my Nginx configuration file:
location /api/ {
proxy_pass http://backend:$BACKEND_PORT/;
proxy_http_version 1.1;
}
And I have the following code snippet in my Docker-Compose.yml
frontend:
image: nginx:1.19.3
container_name: Frontend
env_file: .env
environment:
BACKEND_PORT: ${BACKEND_PORT}
volumes:
- ./Client:/usr/share/nginx/html/
- ./Client/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- backend
ports:
- ${NGINX_PORT}:80
networks:
- client
- server
How do I make my Nginx defacult.conf configuration file recognize my $BACKEND_PORT environment variable ?
Obs? have I tried ${BACKEND_PORT}
, also doesn’t work.
Managed to solve?
– LP. Gonçalves