34 lines
823 B
YAML
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
|