This commit is contained in:
@ -1,29 +1,13 @@
|
||||
{% import 'macro/postgres.j2' as pg with context %}
|
||||
---
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
restart: always
|
||||
environment:
|
||||
- "POSTGRES_DB={{ auth.db.name }}"
|
||||
- "POSTGRES_USER={{ auth.db.user }}"
|
||||
- "POSTGRES_PASSWORD={{ auth.db.password }}"
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- backend
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready", "-U", "{{ auth.db.user }}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
keycloak:
|
||||
image: registry.tobiasmanske.de/keycloak:main
|
||||
command: start
|
||||
depends_on:
|
||||
postgres:
|
||||
pg:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- "KC_DB=postgres"
|
||||
@ -46,7 +30,11 @@ services:
|
||||
- backend
|
||||
- default # keycloak needs to talk to social logins
|
||||
|
||||
{{ pg.postgres("pg", auth.db.user, auth.db.password, auth.db.name, ["backend"]) }}
|
||||
|
||||
networks:
|
||||
postgres:
|
||||
internal: true
|
||||
backend:
|
||||
internal: true
|
||||
|
||||
|
Reference in New Issue
Block a user