mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 05:25:40 +00:00
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:
7
NginxServer/Dockerfile
Normal file
7
NginxServer/Dockerfile
Normal 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
21
NginxServer/nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user