yrnsmth
yrnsmth
RRailway
Created by yrnsmth on 1/16/2024 in #✋|help
custom domain taking a long while to issue TLS cert
No description
10 replies
RRailway
Created by yrnsmth on 12/12/2023 in #✋|help
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-4081f16bb807
16 replies
RRailway
Created by yrnsmth on 12/6/2023 in #✋|help
React/Vite/Caddy re-routing is failing
No description
9 replies
RRailway
Created by yrnsmth on 11/28/2023 in #✋|help
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:
#16 1.392 LoadError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libpthread.so.0) - /usr/local/rvm/gems/ruby-3.0.0/gems/pg-1.2.3/lib/pg_ext.so
#16 1.392 LoadError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libpthread.so.0) - /usr/local/rvm/gems/ruby-3.0.0/gems/pg-1.2.3/lib/pg_ext.so
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
RRailway
Created by yrnsmth on 11/27/2023 in #✋|help
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:
rake aborted!
failed to execute:
pg_dump --schema-only --no-privileges --no-owner --file /app/db/structure.sql railway
Please check the output above for any errors and make sure that `pg_dump` is installed in your PATH and has proper permissions.
rake aborted!
failed to execute:
pg_dump --schema-only --no-privileges --no-owner --file /app/db/structure.sql railway
Please check the output above for any errors and make sure that `pg_dump` is installed in your PATH and has proper permissions.
I'm also getting the following error directly below:
rake aborted!
ActiveRecord::NoDatabaseError: could not translate host name "postgres.railway.internal" to address: Name or service not known
...trace...
Caused by:
PG::ConnectionBad: could not translate host name "postgres.railway.internal" to address: Name or service not known
rake aborted!
ActiveRecord::NoDatabaseError: could not translate host name "postgres.railway.internal" to address: Name or service not known
...trace...
Caused by:
PG::ConnectionBad: could not translate host name "postgres.railway.internal" to address: Name or service not known
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