Files
KeySelector/docker-compose.yml
T
2026-11-15 22:09:36 +01:00

46 lines
1.3 KiB
YAML

services:
keyselector:
build: .
restart: unless-stopped
ports:
- "3030:3000"
environment:
- PORT=3000
- DB_USER=${DB_USER:-postgres}
- DB_HOST=postgres
- DB_NAME=${DB_NAME:-keyselector}
- DB_PASSWORD=${DB_PASSWORD:-postgres}
- ACRCLOUD_HOST=${ACRCLOUD_HOST}
- ACRCLOUD_ACCESS_KEY=${ACRCLOUD_ACCESS_KEY}
- ACRCLOUD_ACCESS_SECRET=${ACRCLOUD_ACCESS_SECRET}
- GETSONGBPM_API_KEY=${GETSONGBPM_API_KEY}
- MINIMAX_API_KEY=${MINIMAX_API_KEY}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://127.0.0.1:3000/', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:15-alpine
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-keyselector}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: