yrnsmth
System sending SIGTERM after foreman executes procfile
So I'm running background jobs with Resque in my rails app (specifically for ActionMailer - but maybe more in the future). I tried using a custom
start.sh
script.. but that wasn't quite working (the services would shut down after they started).
So I bit the bullet and decided to use the foreman gem - as that's what a few StackOverflow posts suggested.
I already had a fairly robust nixpacks.toml
file (thanks to a friendly user here), so I decided to install the foreman gem using the nixpacks.toml
. (It can't be installed in my gemfile, as per the foreman docs) (nixpacks.toml
is attached).
The foreman gem uses a Procfile (also attached) - so I'm using that to:
1. Spin up a production rails server in daemon mode
2. Start my resque worker in the background
This all goes to plan... but then I get logs saying System has terminated the processes. Would there be a reason for this?
If so... does anyone have advice on running a rake task after the rails server spins up? I'd also like it to keep the rails server logging to Railway (I tried running tails -f
as a final task in the procfile - but it kept telling me the ./log/production.log
file doesn't exist?)
Thanks for all the help I'm receiving here, by the way, I really appreciate it!
ProjectID: 1e4b0651-0174-42a1-aac8-4081f16bb80716 replies
LoadError on build
ProjectId: 1e4b0651-0174-42a1-aac8-4081f16bb807
Related to an earlier issue (https://discord.com/channels/713503345364697088/1178533909047291914)
It was suggested I add
postgres
to the nix packages. Now my project is crashing on build, not after publish 😆 .
Full error message is:
I have done a bunch of googling and looking in the nixpacks docs - but can't seem to find the answer..
I added glibc
to the nixPkgs - but it throws the same error. The specific step this is happening on is building my assets:precompile
rake task. This completes successfully if I remove the postgresql
nix package.
Googling the constant GLIBC_ABI_DT_RELR
didn't reveal much - but did bring up the following github issue... which seems tangentally related - though I can't find the nixpkgs-ruby
mentioned in the NixOS search - nor nixpkgs-unstable
(which sounds lke a bad idea - anyway).
So now I'm at a loss again!
Full dump in comments.31 replies
New deploy crashing on pg_dump
I'm attempting to deploy a rails 6 app from GitLab into Railway. It's in api-only mode, and is backed with postgres. It also makes use of a structure.sql instead of the default schema.rb
I keep getting this fatal error after the initial migrate task:
I'm also getting the following error directly below:
What I don't understand is that the initial table migration worked. All my tables have been built out in the postgres service. So the two services are talking to each other.
Do I need to add a build command in the procfile to put pg_dump in the path? Am I missing anything simple?
I'm happy to post the full traces - but they were turning my code blocks into attachments 🙃.
16 replies