Files
Arch1Panel/apps/new-api/0.11.9-allinone/docker-compose.yml

68 lines
1.6 KiB
YAML
Raw Normal View History

2025-07-26 15:20:59 +08:00
services:
new-api:
2026-04-01 05:32:14 +08:00
image: calciumion/new-api:v0.11.9
2025-07-26 15:20:59 +08:00
container_name: ${CONTAINER_NAME}
restart: always
ports:
- ${PANEL_APP_PORT_HTTP}:3000
networks:
- 1panel-network
command: --log-dir /app/logs
volumes:
- ./data:/data
- ./logs:/app/logs
environment:
- SQL_DSN=root:${PANEL_DB_ROOT_PASSWORD}@tcp(${CONTAINER_NAME}-mysql:3306)/${PANEL_DB_NAME}
2025-07-26 15:20:59 +08:00
- TZ=Asia/Shanghai
- REDIS_CONN_STRING=redis://${CONTAINER_NAME}-redis
- ERROR_LOG_ENABLED=true
2026-03-14 02:56:32 +08:00
- BATCH_UPDATE_ENABLED=true
2025-07-26 15:20:59 +08:00
depends_on:
2026-03-14 03:07:41 +08:00
redis:
condition: service_started
mysql:
condition: service_healthy
2025-07-26 15:20:59 +08:00
healthcheck:
test:
- CMD-SHELL
- 'wget -q -O - http://localhost:3000/api/status | grep -o ''"success":\s*true''
| awk -F: ''{print $$2}'''
2025-07-26 15:20:59 +08:00
interval: 30s
timeout: 10s
retries: 3
labels:
createdBy: Apps
2025-07-26 15:20:59 +08:00
mysql:
image: mysql:8.2
container_name: ${CONTAINER_NAME}-mysql
restart: always
volumes:
- mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${PANEL_DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${PANEL_DB_NAME}
2025-07-26 15:20:59 +08:00
networks:
- 1panel-network
2026-03-14 03:07:41 +08:00
healthcheck:
2026-04-01 05:32:14 +08:00
test:
- CMD
- mysqladmin
- ping
- -h
- localhost
2026-03-23 22:15:34 +08:00
interval: 5s
2026-03-14 03:07:41 +08:00
timeout: 5s
2026-03-23 22:15:34 +08:00
retries: 10
start_period: 30s
2025-07-26 15:20:59 +08:00
redis:
image: redis:latest
container_name: ${CONTAINER_NAME}-redis
restart: always
networks:
- 1panel-network
volumes:
mysql_data: null
2025-07-26 15:20:59 +08:00
networks:
1panel-network:
external: true