diff --git a/docker-compose.yml b/docker-compose.yml index 0f26ea7..6c5b036 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,17 @@ services: portal: build: . restart: unless-stopped - ports: - - "8080:8000" env_file: - .env + expose: + - "8000" + + nginx: + image: nginx:alpine + restart: unless-stopped + ports: + - "80:80" volumes: - - ./app/static:/app/app/static + - ./nginx.conf:/etc/nginx/conf.d/default.conf + depends_on: + - portal \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..59b837a --- /dev/null +++ b/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + location / { + proxy_pass http://portal:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +}