feat(phase-0,phase-2): bootstrap DB schemas + Metabase/NocoDB compose + work_types seed

This commit is contained in:
Roman Chesnokov
2026-05-14 15:26:59 +05:00
parent 7b282af5be
commit ba2059ae15
13 changed files with 398 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
-- Runs ONCE on pipeline_postgres as superuser to create the bit_flight_deck DB and user.
--
-- Usage:
-- docker exec -e PGPASSWORD=<superuser-password> -i pipeline_postgres \
-- psql -h localhost -U pipeline_user -d postgres \
-- -v password=$(grep PG_PASSWORD ../.env | cut -d= -f2) \
-- -f infra/init-bit-flight-deck-db.sql
--
-- Or inline (less safe, password visible in shell history):
-- psql ... -v password='your-password' -f infra/init-bit-flight-deck-db.sql
CREATE DATABASE bit_flight_deck;
CREATE USER bit_flight_deck_user WITH PASSWORD :'password';
GRANT ALL PRIVILEGES ON DATABASE bit_flight_deck TO bit_flight_deck_user;
ALTER DATABASE bit_flight_deck OWNER TO bit_flight_deck_user;