docker compose mit docusaurus build command
This commit is contained in:
@@ -67,9 +67,25 @@ services:
|
|||||||
start_period: 30s
|
start_period: 30s
|
||||||
restart: unless-stopped
|
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:
|
web:
|
||||||
image: nginx:1.27-alpine
|
image: nginx:1.27-alpine
|
||||||
depends_on:
|
depends_on:
|
||||||
|
docs-build:
|
||||||
|
condition: service_completed_successfully
|
||||||
app:
|
app:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
labels:
|
labels:
|
||||||
@@ -87,7 +103,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- app-code:/var/www/html:ro
|
- app-code:/var/www/html:ro
|
||||||
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf: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
|
- ./docker/nginx/.htpasswd-docs:/etc/nginx/.htpasswd-docs:ro
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- app-code:/var/www/html:ro
|
- app-code:/var/www/html:ro
|
||||||
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf: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
|
- ./docker/nginx/.htpasswd-docs:/etc/nginx/.htpasswd-docs:ro
|
||||||
ports:
|
ports:
|
||||||
- "${APP_HTTP_PORT:-8080}:80"
|
- "${APP_HTTP_PORT:-8080}:80"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /internal-docs/ {
|
location /internal-docs/ {
|
||||||
alias /var/www/html/docs-site/;
|
alias /var/www/docs-site/;
|
||||||
index index.html;
|
index index.html;
|
||||||
try_files $uri $uri/ /internal-docs/index.html;
|
try_files $uri $uri/ /internal-docs/index.html;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user