Postgres db macro
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-02-05 18:44:13 +01:00
parent f353f67150
commit e8bbb4b167
9 changed files with 86 additions and 191 deletions

View File

@ -1,3 +1,4 @@
{% import 'macro/postgres.j2' as pg with context %}
---
version: '3'
services:
@ -53,27 +54,16 @@ services:
- default
- metrics
db:
image: postgres:15
restart: unless-stopped
environment:
- POSTGRES_USER={{ gotosocial.db.user }}
- POSTGRES_PASSWORD={{ gotosocial.db.password }}
volumes:
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "{{ gotosocial.db.user }}"]
interval: 10s
start_period: 30s
networks:
- backend
{{ pg.postgres("db", gotosocial.db.user, gotosocial.db.password, gotosocial.db.user, ["backend"]) }}
volumes:
database:
db_data:
networks:
backend:
internal: true
metrics:
external: true
postgres:
internal: true
...