1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:54:03 +00:00

Add Postgres to db connections and docker-compose

This commit is contained in:
lukinovec 2023-04-24 17:04:09 +02:00
parent dd4013c998
commit 4eab27e1f0
2 changed files with 29 additions and 6 deletions

View file

@ -52,16 +52,25 @@ services:
timeout: 10s
retries: 10
postgres:
image: postgres:11
image: 'postgres:15'
ports:
- '${FORWARD_DB_PORT:-5433}:5433'
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: root # superuser name
PGPASSWORD: '${DB_PASSWORD:-password}:password'
POSTGRES_DB: main
POSTGRES_USER: '${DB_USERNAME:-root}:root'
POSTGRES_PASSWORD: '${DB_PASSWORD:-password}:password'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
test:
- CMD
- pg_isready
- '-q'
- '-d'
- '${DB_DATABASE}'
- '-U'
- '${DB_USERNAME}'
retries: 3
timeout: 5s
retries: 5
redis:
image: redis:alpine
healthcheck: