From b91f952f80afbe1aa276a6f208a43889cb05bc6a Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Thu, 12 Feb 2026 12:26:52 +0100 Subject: [PATCH] Added proxy --- compose/proxy/nginx.conf | 16 ++++++++++++++++ compose/proxy/proxy.yml | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 compose/proxy/nginx.conf create mode 100644 compose/proxy/proxy.yml diff --git a/compose/proxy/nginx.conf b/compose/proxy/nginx.conf new file mode 100644 index 0000000..77e44d1 --- /dev/null +++ b/compose/proxy/nginx.conf @@ -0,0 +1,16 @@ +events {} +http{ + + upstream backend{ + server web:80; + server web_2:80; + server web_3:80; + } + + server{ + listen 80; + location / { + proxy_pass http://backend; + } + } +} \ No newline at end of file diff --git a/compose/proxy/proxy.yml b/compose/proxy/proxy.yml new file mode 100644 index 0000000..ae26954 --- /dev/null +++ b/compose/proxy/proxy.yml @@ -0,0 +1,14 @@ +services: + web: + image: nginx:alpine + volumes: + - ./web:/usr/share/nginx/html:ro + + proxy: + image: nginx:alpine + ports: + - 80:80 + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - web \ No newline at end of file