feat(migration) add migration

This commit is contained in:
lumither committed 2025-10-13 14:36:21 -04:00
1 parent 02e7166fcb
commit 3a4af1ae8d
9 files changed
+84 -22

No files matched your search

+23 -2
View File
@@ -14,7 +14,7 @@ services:
backend:
depends_on:
- postgres
- migrate
build:
context: ./backend
dockerfile: ../container/release/backend.containerfile
@@ -29,10 +29,31 @@ services:
dns:
- 1.1.1.1
migrate:
image: postgres:17
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env
- ./.env.local
volumes:
- ./migration/ddl:/migrations:ro
- ./migration/migration.sh:/migration.sh:ro
entrypoint: [ "/bin/sh", "/migration.sh" ]
postgres:
image: postgres:16.3
image: postgres:17
ports:
- "5432:5432"
env_file:
- ./.env
- ./.env.local
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s