I have a django app that's also using gunicorn and nginx. I'm able to access my site using http://url:8000, but I don't know how to correctly configure it so I don't have to use the port number in the url at all, ie http://url would by the same as http://url:8000 .
Here's my docker-compose.yml:
version: '3.2' services: immweb: restart: always build: . expose: - "8000" command: gunicorn smn_imm.wsgi:application --bind 0.0.0.0:8000 volumes: - type: volume source: smnvol target: /etc/smn_imm/smnvol ports: - "8000:8000" nginx: build: nginx depends_on: - immweb nginx.conf:
upstream smn_imm { server web:8000; } server { listen 80; server_name smn-imm; location / { proxy_pass http://smn_imm; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect off; } }