imetting_frontend/docker-compose.prod.yml

24 lines
667 B
YAML

services:
imeeting-frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- BACKEND_URL=http://host.docker.internal:8001
volumes:
# 挂载日志目录到宿主机
- ./logs:/app/logs
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
container_name: imeeting-frontend
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3001/health", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 3