Skip to content

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

fix: Run frontend as rootless container (#322)

Cilencod00204443e60
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 255fdacb..581a5a6e 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -114,7 +114,7 @@ services:
frontend:
image: ghcr.io/securo-finance/securo-frontend:latest
ports:
- - "${FRONTEND_PORT:-3000}:80"
+ - "${FRONTEND_PORT:-3000}:8080"
environment:
BACKEND_URL: http://backend:8000
FRONTEND_URL: http://localhost:3000
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index 2c9603f4..c3741c50 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -12,9 +12,9 @@ COPY . .
RUN npm run build
# Serve with nginx
-FROM nginx:alpine
+FROM nginxinc/nginx-unprivileged:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY default.conf.template /etc/nginx/templates/default.conf.template
-EXPOSE 80
+EXPOSE 8080
diff --git a/frontend/default.conf.template b/frontend/default.conf.template
index 33a47545..e82b5e60 100644
--- a/frontend/default.conf.template
+++ b/frontend/default.conf.template
@@ -1,5 +1,5 @@
server {
- listen 80;
+ listen 8080;
root /usr/share/nginx/html;
index index.html;