Files
new-api/docker-compose-custom.yml

37 lines
1.0 KiB
YAML
Raw Normal View History

version: '3.4'
services:
new-api-custom:
build:
context: .
dockerfile: Dockerfile
image: new-api-custom:latest
container_name: new-api-custom
restart: always
command: --log-dir /app/logs
ports:
- "3099:3000" # (3099<39><39>
volumes:
- ./data:/data # q<><71> pn<70>U
- ./logs-custom:/app/logs # (<28><><EFBFBD><EFBFBD><EFBFBD>U
environment:
- SQL_DSN=root:123456@tcp(mysql:3306)/new-api # ޥ<> <09>mysql<71>h
- REDIS_CONN_STRING=redis://redis # ޥ<> <09>redis<69>h
- TZ=Asia/Shanghai
- ERROR_LOG_ENABLED=true
# - STREAMING_TIMEOUT=120
# - SESSION_SECRET=random_string # <20><><00>:<3A>r
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $$2}'"]
interval: 30s
timeout: 10s
retries: 3
networks:
- new-api_default # ޥ0<DEA5> <09>Q<EFBFBD> (<28> <09> redis <20> mysql
# <EFBFBD>I redis <20> mysql <EFBFBD> <0C><>(<28> <09>L<EFBFBD><4C>h
# <20><00>ޥ0<DEA5> <0C>Q<EFBFBD>s<EFBFBD><73><EFBFBD>
networks:
new-api_default:
external: true # (<28> <09>Q<EFBFBD>