first commit
This commit is contained in:
8
nginx/Dockerfile
Normal file
8
nginx/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
# Fetching the base image
|
||||
FROM nginx:1.25.3-alpine
|
||||
|
||||
# Copying configuration file
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Exposing port
|
||||
EXPOSE 8001
|
20
nginx/default.conf
Normal file
20
nginx/default.conf
Normal file
@ -0,0 +1,20 @@
|
||||
upstream django {
|
||||
server django:8001;
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
listen 8001;
|
||||
|
||||
location / {
|
||||
proxy_pass http://django;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /static/ {
|
||||
autoindex on;
|
||||
alias /django/static/;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user