From 7e5e39c866cd785a1c04ff5062b8a86f6b849db8 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Thu, 20 Nov 2025 13:03:26 +0100 Subject: [PATCH] docker compose mit docusaurus build command --- docker-compose.dokploy.yml | 18 +++++++++++++++++- docker-compose.yml | 2 +- docker/nginx/default.conf | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docker-compose.dokploy.yml b/docker-compose.dokploy.yml index 540b565..8c8128a 100644 --- a/docker-compose.dokploy.yml +++ b/docker-compose.dokploy.yml @@ -67,9 +67,25 @@ services: start_period: 30s restart: unless-stopped + docs-build: + image: node:20 + working_dir: /var/www/html/docs/site + command: + - bash + - -lc + - npm ci && npm run build + volumes: + - app-code:/var/www/html + depends_on: + app: + condition: service_healthy + restart: "no" + web: image: nginx:1.27-alpine depends_on: + docs-build: + condition: service_completed_successfully app: condition: service_healthy labels: @@ -87,7 +103,7 @@ services: volumes: - app-code:/var/www/html:ro - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - - ./docs/site/build:/var/www/html/docs-site:ro + - ./docs/site/build:/var/www/docs-site:ro - ./docker/nginx/.htpasswd-docs:/etc/nginx/.htpasswd-docs:ro networks: - default diff --git a/docker-compose.yml b/docker-compose.yml index ceaeb1c..b409b2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: volumes: - app-code:/var/www/html:ro - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - - ./docs/site/build:/var/www/html/docs-site:ro + - ./docs/site/build:/var/www/docs-site:ro - ./docker/nginx/.htpasswd-docs:/etc/nginx/.htpasswd-docs:ro ports: - "${APP_HTTP_PORT:-8080}:80" diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 0400f81..957cfe8 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -30,7 +30,7 @@ server { } location /internal-docs/ { - alias /var/www/html/docs-site/; + alias /var/www/docs-site/; index index.html; try_files $uri $uri/ /internal-docs/index.html;