Created
February 1, 2026 01:55
-
-
Save jeremysmithco/1aa202287fc64333a24f8ad059d64d1b to your computer and use it in GitHub Desktop.
Conductor Setup for Rails App 2026-01-31
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
| #====================== | |
| # Setup | |
| #====================== | |
| docker compose -f $CONDUCTOR_ROOT_PATH/docker-compose.yml up -d | |
| sed -e "s/^DATABASE_PREFIX=$/DATABASE_PREFIX=${CONDUCTOR_WORKSPACE_NAME}-/" \ | |
| "$CONDUCTOR_ROOT_PATH/.env.development" > .env.development | |
| sed -e "s/^DATABASE_PREFIX=$/DATABASE_PREFIX=${CONDUCTOR_WORKSPACE_NAME}-/" \ | |
| "$CONDUCTOR_ROOT_PATH/.env.test" > .env.test | |
| bundle install | |
| yarn install | |
| bin/rails db:prepare | |
| RAILS_ENV=test bin/rails db:prepare | |
| #====================== | |
| # Run | |
| #====================== | |
| docker compose -f $CONDUCTOR_ROOT_PATH/docker-compose.yml up -d | |
| PORT=$CONDUCTOR_PORT bin/dev | |
| #====================== | |
| # Archive | |
| #====================== | |
| eval "$(mise activate bash)" | |
| docker compose -f $CONDUCTOR_ROOT_PATH/docker-compose.yml up -d | |
| bin/rails log:clear tmp:clear | |
| bin/rails db:drop | |
| RAILS_ENV=test bin/rails db:drop |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been using Conductor pretty heavily since last weekend, and iterating on my scripts for various Rails apps.
I'm finding that there are so many things that are particular to one setup that might determine what should go in these scripts.
For me and the Rails apps I work on, it's the following:
Here’s an explanation of each script…
Setup
DATABASE_URL=postgres://postgres:password@localhost:5442/${DATABASE_PREFIX}app_developmentRun
CONDUCTOR_PORTfor the web serverArchive
Also, depending on the app, I may need to use
sedto replace other ENV var port values withCONDUCTOR_PORT.