From 29fa443b937c5e53a20deac2afdeb2be61b00828 Mon Sep 17 00:00:00 2001 From: Halit Aksoy Date: Fri, 16 Oct 2026 00:05:21 +0300 Subject: [PATCH] build: add shared Postgres and Valkey to compose - postgres replaces keycloak-db and holds a keycloak and a mancala database, each with its own user, created by apps/postgres/init - valkey with an append-only file for live game state and caches - backend gets DATABASE_URL and VALKEY_URL --- README.md | 17 +++++++++++++ apps/compose.yaml | 41 +++++++++++++++++++++++------- apps/keycloak/README.md | 5 ++++ apps/postgres/init/01-databases.sh | 15 +++++++++++ docs/specs/game-history/tasks.md | 2 +- 5 files changed, 70 insertions(+), 10 deletions(-) create mode 100755 apps/postgres/init/01-databases.sh diff --git a/README.md b/README.md index 545cd3d..6d1c657 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,23 @@ yarn build:packages # from the repo root After changing a package, rebuild it (or run `yarn dev` in it to rebuild on change); the apps pick up the new `dist`. +Postgres (games and Keycloak), Valkey (live games and caches) and Keycloak run with Docker Compose. Create +`apps/.env` once, then start them: + +```sh +cd apps +cat > .env < .env <