mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-23 10:05:10 +02:00
♻️(yhub) maintain database schema using npm run init-db
The yhub database schema have new update and will probably be modified in the future. We don't want to maintain this sql schema in the Docs repo, we want to reuse what is directly made in the yhub project. For this we reuse the existing bin/init-db.js script
This commit is contained in:
+4
-2
@@ -219,14 +219,16 @@ services:
|
||||
- env.d/development/yhub-postgres
|
||||
volumes:
|
||||
- yhub-pgdata:/var/lib/postgresql/data
|
||||
# NOTE: initdb.d only runs on a FRESH volume; schema changes need `podman volume rm`
|
||||
- ./docker/files/yhub/initdb:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U yhub"]
|
||||
interval: 1s
|
||||
timeout: 2s
|
||||
retries: 60
|
||||
# no published port (Django's postgres already publishes)
|
||||
# the schema is not seeded here: initdb.d would only replay on a fresh
|
||||
# volume, so an upgrade that adds a table would silently skip an existing
|
||||
# one. `make migrate-yhub` runs yhub's own DDL script instead, the same way
|
||||
# `make migrate` runs Django's migrations.
|
||||
|
||||
yhub:
|
||||
user: ${DOCKER_USER:-1000}
|
||||
|
||||
Reference in New Issue
Block a user