This commit is contained in:
@ -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
|
||||
...
|
||||
|
Reference in New Issue
Block a user