refactor: Integrate Flyway for database migrations and simplify Docker Compose and tenant configurations.
This commit is contained in:
20
compose.yaml
20
compose.yaml
@@ -10,9 +10,7 @@ services:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
networks:
|
||||
- proxy
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
container_name: frontend
|
||||
restart: always
|
||||
@@ -23,6 +21,7 @@ services:
|
||||
- proxy
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
db:
|
||||
image: postgres:alpine3.23
|
||||
container_name: db
|
||||
@@ -30,21 +29,12 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_USER: myuser
|
||||
POSTGRES_PASSWORD: supersecretpassword
|
||||
POSTGRES_DB: app_db
|
||||
volumes:
|
||||
- ./db/data:/var/lib/postgresql
|
||||
- ./db/init:/docker-entrypoint-initdb.d:ro
|
||||
networks:
|
||||
- proxy
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- pg_isready -U ${POSTGRES_USER} -d app_db
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user