Files
ctms/docker-compose.dev.yaml
Cheng Zhou d5279b124f
Storage Persistence Guard / storage-persistence-audit (push) Has been cancelled
Client Quality Gates / Shared client and Web (push) Has been cancelled
Client Quality Gates / macOS Desktop (push) Has been cancelled
Client Quality Gates / Shared client and Web (pull_request) Has been cancelled
Client Quality Gates / macOS Desktop (pull_request) Has been cancelled
Storage Persistence Guard / storage-persistence-audit (pull_request) Has been cancelled
release(main): 同步 dev 最新候选改动
2026-07-16 17:15:50 +08:00

92 lines
2.4 KiB
YAML

services:
db:
extends:
file: docker-compose.yaml
service: db
backend:
extends:
file: docker-compose.yaml
service: backend
backend-init:
extends:
file: docker-compose.yaml
service: backend-init
onlyoffice:
extends:
file: docker-compose.yaml
service: onlyoffice
frontend-dev:
image: node:22.13-alpine
container_name: ctms_frontend_dev
restart: always
working_dir: /app
command:
- sh
- -c
- |
set -e
lock_hash="$$(sha256sum package-lock.json | awk '{print $$1}')"
dependency_hash="$$lock_hash:$$(node --version)"
marker="node_modules/.ctms-package-lock.sha256"
missing_runtime_deps=0
for dep in @tauri-apps/api @tauri-apps/plugin-dialog @tauri-apps/plugin-fs @tauri-apps/plugin-opener pdfjs-dist; do
if [ ! -d "node_modules/$$dep" ]; then
missing_runtime_deps=1
fi
done
if [ ! -f "$$marker" ] || [ "$$(cat "$$marker")" != "$$dependency_hash" ] || [ "$$missing_runtime_deps" = "1" ]; then
npm ci
printf '%s' "$$dependency_hash" > "$$marker"
fi
npm run dev -- --host 0.0.0.0
environment:
NPM_CONFIG_REGISTRY: ${NPM_CONFIG_REGISTRY:-https://registry.npmmirror.com}
VITE_RUNTIME_ENV: ${ENV:-development}
VITE_ALLOW_INSECURE_DEV_LOGIN: ${VITE_ALLOW_INSECURE_DEV_LOGIN:-true}
VITE_HMR_CLIENT_PORT: ${VITE_HMR_CLIENT_PORT:-8888}
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:5173/"]
interval: 2s
timeout: 2s
retries: 90
start_period: 5s
volumes:
- ./frontend:/app
- frontend_node_modules_node22:/app/node_modules
depends_on:
- backend
networks:
- ctms_net
nginx:
image: nginx:1.27-alpine
container_name: ctms_nginx
restart: always
ports:
- "8888:80"
volumes:
- ./nginx/nginx.dev.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./frontend/public/favicon.ico:/usr/share/nginx/html/favicon.ico:ro
depends_on:
backend:
condition: service_healthy
frontend-dev:
condition: service_healthy
networks:
- ctms_net
volumes:
frontend_node_modules_node22:
onlyoffice_data:
onlyoffice_lib:
onlyoffice_logs:
networks:
ctms_net:
driver: bridge