48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
|
|
name: ${COMPOSE_PROJECT_NAME:-zhixing-system-dev}
|
||
|
|
|
||
|
|
services:
|
||
|
|
server:
|
||
|
|
build:
|
||
|
|
context: ./zhixing-server
|
||
|
|
target: development
|
||
|
|
environment:
|
||
|
|
ZHIXING_APP_ENV: ${ZHIXING_APP_ENV:-development}
|
||
|
|
ZHIXING_LOG_LEVEL: ${ZHIXING_LOG_LEVEL:-INFO}
|
||
|
|
init: true
|
||
|
|
ports:
|
||
|
|
- "${ZHIXING_SERVER_PORT:-8000}:8000"
|
||
|
|
volumes:
|
||
|
|
- ./zhixing-server:/app
|
||
|
|
- server-venv:/app/.venv
|
||
|
|
healthcheck:
|
||
|
|
test:
|
||
|
|
- CMD
|
||
|
|
- python
|
||
|
|
- -c
|
||
|
|
- "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz')"
|
||
|
|
interval: 5s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 10
|
||
|
|
start_period: 5s
|
||
|
|
|
||
|
|
web:
|
||
|
|
build:
|
||
|
|
context: ./zhixing-web
|
||
|
|
target: development
|
||
|
|
depends_on:
|
||
|
|
server:
|
||
|
|
condition: service_healthy
|
||
|
|
environment:
|
||
|
|
VITE_DEV_API_TARGET: http://server:8000
|
||
|
|
init: true
|
||
|
|
ports:
|
||
|
|
- "${ZHIXING_WEB_PORT:-5173}:5173"
|
||
|
|
volumes:
|
||
|
|
- ./zhixing-web:/app
|
||
|
|
- web-node-modules:/app/node_modules
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
server-venv:
|
||
|
|
web-node-modules:
|
||
|
|
|