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:
@ -39,23 +40,10 @@ services:
- default
- metrics
db:
image: postgres:13
restart: unless-stopped
environment:
- POSTGRES_USER={{ miniflux.db.user }}
- POSTGRES_PASSWORD={{ miniflux.db.password }}
volumes:
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "{{ miniflux.db.user }}"]
interval: 10s
start_period: 30s
networks:
- backend
{{ pg.postgres("db", miniflux.db.user, miniflux.db.password, miniflux.db.user, ["backend"], version="13") }}
volumes:
database:
db_data:
networks:
backend:
@ -64,4 +52,6 @@ networks:
external: true
metrics:
external: true
postgres:
internal: true
...