Files
hexin-codex-bot 53b0c62120
Verify and deploy production / verify-and-deploy (push) Successful in 2m45s
ops: add PostgreSQL compose deployment
2026-10-05 16:01:01 +08:00

34 lines
823 B
YAML

name: rednote-tool-studio
services:
postgres:
image: postgres:17-bookworm
restart: unless-stopped
shm_size: 256mb
environment:
POSTGRES_DB: rednote_studio
POSTGRES_USER: rednote_studio
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets:
- postgres_password
ports:
- "127.0.0.1:5432:5432"
volumes:
- /var/lib/rednote-tool-studio/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rednote_studio -d rednote_studio"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
stop_grace_period: 60s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
secrets:
postgres_password:
file: /etc/rednote-tool-studio/postgres-password