richard_21848
richard_21848
RRailway
Created by richard_21848 on 9/2/2023 in #✋|help
Run a command in production (rake)
ok rad, this was slightly more complicated because my app runs in a container locally (and doesn't work outside it), in case it's any use to others I created a new compose service:
railway:
entrypoint: bin/railway_entrypoint
env_file: .railway.env
tty: true
volumes:
- .:/rails
railway:
entrypoint: bin/railway_entrypoint
env_file: .railway.env
tty: true
volumes:
- .:/rails
with bin/railway_entrypoint:
#!/bin/bash -e

bash <(curl -fsSL cli.new) -b ./bin -y > /dev/null
bin/railway $@
#!/bin/bash -e

bash <(curl -fsSL cli.new) -b ./bin -y > /dev/null
bin/railway $@
and added .railway.env with a RAILWAY_TOKEN in . Then it's docker compose run --rm railway run rake db:seed Thanks for confirming this is the recommended way!
9 replies
RRailway
Created by richard_21848 on 9/2/2023 in #✋|help
Run a command in production (rake)
8f20bec2-837e-46f0-8721-83eb63749406
9 replies