CaiWuXiTong/compose.jiangling.yml

46 lines
1.1 KiB
YAML

# 服务器只运行本机已加载的镜像,禁止在服务器执行 docker compose build。
services:
db:
image: mariadb:11.4
pull_policy: missing
container_name: caiwu_db
restart: unless-stopped
env_file:
- ./runtime/.env
volumes:
- caiwu_database:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
app:
image: caiwu_akaunting:${IMAGE_TAG:?IMAGE_TAG is required}
pull_policy: never
container_name: caiwu_app
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
RUN_MIGRATIONS: ${RUN_MIGRATIONS:-0}
ports:
- "80:18088"
volumes:
- ./runtime/.env:/var/www/html/.env
- caiwu_storage:/var/www/html/storage
healthcheck:
test: ["CMD", "curl", "-fsS", "-o", "/dev/null", "http://127.0.0.1:18088/"]
interval: 15s
timeout: 5s
retries: 10
start_period: 45s
volumes:
caiwu_database:
name: caiwu_database
caiwu_storage:
name: caiwu_storage