support db migrations

This commit is contained in:
Aleksandr Trushkin
2024-08-13 13:15:11 +03:00
parent 880f67aa73
commit 30e5968e03
11 changed files with 163 additions and 9 deletions

View File

@ -1,6 +1,6 @@
services:
web.mongo:
image: git.loyso.art/devsim:latest
image: git.loyso.art/devsim-web:latest
ports:
- 9124:80
depends_on:
@ -11,16 +11,26 @@ services:
DEVSIM_STORE_TYPE: mongo
web.pg:
image: git.loyso.art/devsim:latest
image: git.loyso.art/devsim-web:latest
ports:
- 9123:80
depends_on:
- postgres
- mongo
- postgres-migrator
environment:
DEVSIM_PG_DSN: "postgres://devsim:devsim@postgres:5432/devsim?sslmode=disable"
DEVSIM_STORE_TYPE: pg
postgres-migrator:
image: git.loyso.art/devsim-migrator:latest
depends_on:
postgres:
condition: service_healthy
restart: true
environment:
DEVSIM_PG_DSN: "postgres://devsim:devsim@postgres:5432/devsim?sslmode=disable"
postgres:
image: postgres:15-alpine
environment:
@ -28,6 +38,12 @@ services:
POSTGRES_PASSWORD: devsim
POSTGRES_USER: devsim
ports: ["5432:5432"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U devsim -d devsim"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
mongo:
image: mongo:7