Files
server/docker-compose.blue.yml
2026-01-16 15:49:34 +08:00

37 lines
876 B
YAML

version: '3.8'
services:
goravel-blue:
build:
context: .
dockerfile: Dockerfile
image: goravel-admin:blue
container_name: goravel-admin-blue
ports:
- "${BLUE_PORT:-3000}:${CONTAINER_PORT:-3000}"
environment:
- APP_ENV=production
- APP_HOST=0.0.0.0
- APP_PORT=${CONTAINER_PORT:-3000}
env_file:
- .env
volumes:
# 持久化存储
- ./storage:/www/storage
# 持久化日志
- ./logs:/www/storage/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:${CONTAINER_PORT:-3000}/health"]
interval: 10s
timeout: 3s
retries: 3
start_period: 60s # 增加启动等待时间,因为需要执行迁移
networks:
- goravel-network
networks:
goravel-network:
driver: bridge