docker-compose.yml
This commit is contained in:
parent
16f53b5afb
commit
5cc19d911a
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
version: '3.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
one-api:
|
||||||
|
image: justsong/one-api:latest
|
||||||
|
container_name: one-api
|
||||||
|
restart: always
|
||||||
|
command: --log-dir /app/logs
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- /home/ubuntu/data/one-api:/data
|
||||||
|
- /home/ubuntu/data/one-api/logs:/app/logs
|
||||||
|
# environment:
|
||||||
|
# REDIS_CONN_STRING: redis://default:redispw@localhost:49153
|
||||||
|
# SESSION_SECRET: random_string
|
||||||
|
# SQL_DSN: root:123456@tcp(localhost:3306)/one-api
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", "http://localhost:3000", "|", "grep", "200"] #改为curl检测状态
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
Loading…
Reference in New Issue
Block a user