Created
April 9, 2025 03:03
-
-
Save kylewlacy/32f95b5a2a753803b1187779fe911490 to your computer and use it in GitHub Desktop.
Sketch of using Brioche + Just + Process Compose for managing services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: services-start | |
node src/example.js | |
services-start: | |
process-compose up -D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment: | |
# The directory where the database files will be stored | |
- PGDATA=./db | |
processes: | |
# The Postgres server | |
database: | |
command: "postgres" | |
depends_on: | |
database-setup: | |
condition: process_completed_successfully | |
# Create a new database before starting Postgres | |
database-setup: | |
command: "initdb || true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as std from "std"; | |
import processCompose from "process_compose"; | |
import just from "just"; | |
import postgresql from "postgresql"; | |
import nodejs from "nodejs"; | |
// Run with `brioche run -e runTests` | |
export function runTests() { | |
return std.bashRunnable` | |
just test | |
`.dependencies(std.bash(), just(), processCompose(), postgresql(), nodejs()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment