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.9'
@ -36,22 +37,7 @@ services:
db:
condition: service_healthy
db:
image: postgres:14
restart: always
environment:
- "POSTGRES_USER={{ gitea.db.user }}"
- "POSTGRES_PASSWORD={{ gitea.db.password }}"
- "POSTGRES_DB={{ gitea.db.name }}"
networks:
- backend
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "{{ gitea.db.user }}"]
interval: 10s
timeout: 5s
retries: 5
{{ pg.postgres("db", gitea.db.user, gitea.db.password, gitea.db.name, ["backend"], version="14" ) }}
drone:
image: drone/drone:2
@ -82,11 +68,13 @@ services:
- gitea
networks:
postgres:
internal: true
backend:
internal: true
volumes:
gitea_data:
drone_data:
pg_data:
db_data:
...