wip: currently rewriting the project as a full stack application tangled.org/kacaii.dev/sigo
gleam

use `docker compose` to run the database

+6 -18
+6 -18
.justfiles/postgres.just
··· 2 2 3 3 docker := require("docker") 4 4 psql := require("psql") 5 - 6 - # 7 - 8 5 database_url := env("DATABASE_URL") 9 - postgres_db := env("POSTGRES_DB") 10 - postgres_password := env("POSTGRES_PASSWORD") 11 - postgres_user := env("POSTGRES_USER") 12 - 13 - # 14 - 15 - image := "postgres:18-alpine" 16 - port := "5432" 17 6 18 7 # List available recipes 19 8 default: 20 9 just --list db 21 10 22 11 #  Run the DataBase container 23 - run-database-container: 24 - {{ docker }} run --rm --name postgres \ 25 - -e POSTGRES_USER={{ postgres_user }} \ 26 - -e POSTGRES_PASSWORD={{ postgres_password }} \ 27 - -e POSTGRES_DB={{ postgres_db }} \ 28 - -p {{ port }}:5432 \ 29 - -d {{ image }} 12 + run-container: 13 + {{ docker }} compose --profile db up -d 14 + 15 + #  Stop the DataBase container 16 + stop-container: 17 + {{ docker }} compose --profile db down 30 18 31 19 #  Rebuild the database empty 32 20 [no-cd]