| 1 | # Local development stack. Production is provisioned via Ansible (S37); |
| 2 | # this file is for `make dev-db` and friends. |
| 3 | # |
| 4 | # Services: |
| 5 | # postgres — primary database (Postgres 16, S01) |
| 6 | # minio — S3-compatible object store (S04) |
| 7 | # mailhog — local SMTP catcher (S05) |
| 8 | # |
| 9 | # Each is volume-backed for dev persistence and bound to localhost only. |
| 10 | |
| 11 | name: shithub-dev |
| 12 | |
| 13 | services: |
| 14 | postgres: |
| 15 | image: postgres:16 |
| 16 | container_name: shithub-postgres |
| 17 | restart: unless-stopped |
| 18 | environment: |
| 19 | POSTGRES_USER: shithub |
| 20 | POSTGRES_PASSWORD: shithub_dev |
| 21 | POSTGRES_DB: shithub |
| 22 | ports: |
| 23 | - "127.0.0.1:5432:5432" |
| 24 | volumes: |
| 25 | - shithub-pgdata:/var/lib/postgresql/data |
| 26 | healthcheck: |
| 27 | test: ["CMD-SHELL", "pg_isready -U shithub -d shithub"] |
| 28 | interval: 5s |
| 29 | timeout: 3s |
| 30 | retries: 10 |
| 31 | start_period: 10s |
| 32 | command: |
| 33 | - "postgres" |
| 34 | - "-c" |
| 35 | - "shared_preload_libraries=pg_stat_statements" |
| 36 | - "-c" |
| 37 | - "log_statement=none" |
| 38 | - "-c" |
| 39 | - "max_connections=100" |
| 40 | |
| 41 | volumes: |
| 42 | shithub-pgdata: |
| 43 | name: shithub-pgdata |
| 44 |