mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(migration) add migration
This commit is contained in:
9 files changed
+84
-22
No files matched your search
+23
-2
@@ -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
|
||||
Reference in new issue
Block a user