From fb79f48c14a2fefc13c4d530c4f2cc345fb89d0d Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Wed, 15 Jan 2025 10:52:06 +0100 Subject: [PATCH] Primer commit --- Dockerfile | 4 ++++ nginx.conf | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8328a0e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.25 + +RUN rm /etc/nginx/conf.d/default.conf +COPY nginx.conf /etc/nginx/conf.d diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..49d14db --- /dev/null +++ b/nginx.conf @@ -0,0 +1,25 @@ +upstream jugaralpadel { + server jugaralpadel:8000; +} + +server { + + listen 80; + + location / { + proxy_pass http://jugaralpadel; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + client_max_body_size 100M; + } + + location /static/ { + alias /app/gestion_reservas/staticfiles/; + } + + location /media/ { + alias /app/gestion_reservas/mediafiles/; + } + +}