Adicionando viuetify y dockers para correr el proyecto completo #34

Merged
mono merged 7 commits from experiment_sale_with_vuetify_#33 into main 2024-09-28 16:03:57 -05:00
5 changed files with 56 additions and 1 deletions
Showing only changes of commit 2c8911fb78 - Show all commits

8
django.Dockerfile Normal file
View File

@ -0,0 +1,8 @@
from python:3.12-slim
WORKDIR /app/
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "manage.py", "runserver", "0.0.0.0:9090"]

19
docker-compose.yml Normal file
View File

@ -0,0 +1,19 @@
services:
nginx:
build:
context: ./
dockerfile: nginx.Dockerfile
ports:
- "7000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./tienda_ilusion/don_confiao/static/frontend:/var/www/frontend/
django:
build:
context: ./
dockerfile: django.Dockerfile
volumes:
- ./tienda_ilusion:/app/
ports:
- 7001:9090

10
nginx.Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM nginx:latest
# Copiamos el archivo de configuración NGINX
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Establecemos la variable de entorno para el proxy inverso
ENV DJANGO_PROXY_URL http://django:8000
# Creamos un directorio estático
RUN mkdir -p /var/www/frontend

18
nginx.conf Normal file
View File

@ -0,0 +1,18 @@
server {
listen 80;
server_name donconfiao.org;
location /frontend {
alias /var/www/frontend/;
# index index.html;
autoindex on;
}
location / {
proxy_pass http://django:9090;
proxy_set_header Host $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;
}
}

View File

@ -67,5 +67,5 @@ export default defineConfig({
build: { build: {
outDir: '../../static/frontend/', outDir: '../../static/frontend/',
}, },
base: '/static/frontend/', base: '/frontend/',
}) })