Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

fix: decouple nginx.conf from container names (#288)

Cilenco09d6a5dacf3e
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index e1f0c442..2c9603f4 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -15,6 +15,6 @@ RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
-COPY nginx.conf /etc/nginx/conf.d/default.conf
+COPY default.conf.template /etc/nginx/templates/default.conf.template
EXPOSE 80
diff --git a/frontend/nginx.conf b/frontend/default.conf.template
similarity index 94%
rename from frontend/nginx.conf
rename to frontend/default.conf.template
index bc5158ee..33a47545 100644
--- a/frontend/nginx.conf
+++ b/frontend/default.conf.template
@@ -5,7 +5,7 @@ server {
# API proxy to backend
location /api/ {
- proxy_pass http://backend:8000;
+ proxy_pass ${BACKEND_URL};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;