From 385861f48604dd323e9fe468999af5d874812bf7 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Mon, 25 May 2026 18:36:41 +0000 Subject: [PATCH] Add frontend container (nginx) with api proxy, restore two-container architecture --- docker-compose.simple.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docker-compose.simple.yml b/docker-compose.simple.yml index 3079011..4440bcc 100644 --- a/docker-compose.simple.yml +++ b/docker-compose.simple.yml @@ -50,5 +50,32 @@ services: start_period: 40s restart: unless-stopped + frontend: + image: nginx:alpine + working_dir: /app + expose: + - "80" + command: + - sh + - '-c' + - | + apk add --no-cache git nodejs npm curl + git clone --depth 1 https://forgejo.media-on.de/Leopoldadmin/web-cad.git /tmp/repo + cd /tmp/repo/frontend + npm ci + npx vite build --mode production + cp -r dist/* /usr/share/nginx/html/ + cp nginx.conf /etc/nginx/conf.d/default.conf + nginx -g 'daemon off;' + depends_on: + - backend + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80/"] + interval: 15s + timeout: 5s + retries: 15 + start_period: 120s + restart: unless-stopped + volumes: pg_data: