Docker compose nginx config setup to broadcast on port 8000 Docker compose nginx config setup to broadcast on port 8000 nginx nginx

Docker compose nginx config setup to broadcast on port 8000


The example docker-compose config is mapping port 8000 to 80, and then the NGINX config is redirecting port 80 to 443 which is not being provided externally.

Your NGINX service needs to make port 80 and 443 into the container (it is listening on those ports).

  nginx:    build: ./nginx    volumes:      - static_volume:/home/dchll/web/staticfiles      - media_volume:/home/dchll/web/mediafiles    ports:      - 443:443      - 80:80    depends_on:      - web

The NGINX service will then be reverse proxied to your app on port 8000 within the Docker container, but port 8000 will not be available externally.