56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
services:
|
|
gpt-load:
|
|
image: ghcr.io/tbphp/gpt-load:latest
|
|
# build:
|
|
# context: .
|
|
# dockerfile: Dockerfile
|
|
container_name: gpt-load
|
|
ports:
|
|
- "3000:3000"
|
|
env_file:
|
|
- .env
|
|
restart: always
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
mysql:
|
|
image: mysql:8.2
|
|
container_name: gpt-load-mysql
|
|
restart: always
|
|
# ports:
|
|
# - "3306:3306"
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: 123456
|
|
MYSQL_DATABASE: gpt_load
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: gpt-load-redis
|
|
restart: always
|
|
# ports:
|
|
# - "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
volumes:
|
|
mysql_data:
|