docker: criado docker-compose com o django_app e o nginx_server como proxy reverso e servindo statics files em um volume compartilhado

This commit is contained in:
2025-04-13 21:50:47 -03:00
parent 3a3c804b3c
commit 44cfa49455
12 changed files with 81 additions and 81 deletions

7
NginxServer/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM nginx:latest
# Remover a configuração padrão
RUN rm /etc/nginx/conf.d/default.conf
# Copiar sua configuração personalizada
COPY nginx.conf /etc/nginx/conf.d/

21
NginxServer/nginx.conf Normal file
View File

@@ -0,0 +1,21 @@
upstream django_upstream {
server django_app:8000;
}
server {
listen 80;
server_name rrbec.local.com;
location /static/ {
alias /app/gestaoRaul/static/;
}
location / {
proxy_pass http://django_upstream;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}