Files
huishou/deploy/docker-compose.yml
T
2026-07-27 13:37:48 +08:00

38 lines
960 B
YAML

services:
backend:
build:
context: .
dockerfile: Dockerfile
container_name: huishou-backend
ports:
- "4000:4000"
volumes:
- ./server/data:/app/server/data
- ./server/icons:/app/server/icons
environment:
- NODE_ENV=production
- PORT=4000
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:4000/api/prices', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
nginx:
image: nginx:latest
container_name: huishou
ports:
- "8080:80"
volumes:
- ./admin:/usr/share/nginx/html/admin
- ./dist/build/h5:/usr/share/nginx/html/h5
- ./admin/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- backend
restart: unless-stopped
networks:
default:
driver: bridge