Skip to content

Commit

Permalink
New Dockerfile for spot_nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
mleist committed Feb 12, 2024
1 parent 32a4dae commit d2bb11c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:1.25

RUN rm /etc/nginx/conf.d/default.conf
COPY ./compose/production/nginx/nginx.conf /etc/nginx/conf.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
upstream spot_django {
server spot:{{cookiecutter.d4service_spot_port}};
}

server {

listen 80;

location / {
proxy_pass http://spot_django;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}

location /static/ {
alias /app/config/staticfiles/;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ services:
image: {{ cookiecutter.project_slug }}_prod_django_spot
build:
context: .
dockerfile: ./compose/production/spot/Dockerfile_nginx
dockerfile: ./compose/production/spot_nginx/Dockerfile
container_name: spot_nginx
volumes:
- prod_django_static_volume:/app/config/staticfiles
Expand Down

0 comments on commit d2bb11c

Please sign in to comment.