Browse Source

chore(railway): log PORT in entrypoint, make seed non-fatal, add deploy log troubleshooting

Co-authored-by: Cursor <cursoragent@cursor.com>
pull/6386/head
Yash Kuceriya 1 month ago
parent
commit
bc72ecbee7
  1. 2
      ENV_KEYS.md
  2. 5
      docker/entrypoint.sh

2
ENV_KEYS.md

@ -43,6 +43,8 @@ Here, **Postgres and Redis are provided by Railway**; you only generate the two
**Setup:** In your Railway project, open the **Ghostfolio** service (the one from GitHub) → **Variables** → add each variable. For Postgres and Redis, copy from the addon services. For `ACCESS_TOKEN_SALT` and `JWT_SECRET_KEY`, generate once and paste. **Setup:** In your Railway project, open the **Ghostfolio** service (the one from GitHub) → **Variables** → add each variable. For Postgres and Redis, copy from the addon services. For `ACCESS_TOKEN_SALT` and `JWT_SECRET_KEY`, generate once and paste.
**If healthcheck fails:** Open the Ghostfolio service → **Deployments** → latest deploy → **View logs**. Use the **Deploy** (runtime) logs, not Build. Look for: `Entrypoint: PORT=...`, `Running database migrations`, `Seeding the database`, `Starting the server`, and `Listening at http://...`. If logs stop before `Listening at`, the failure is there (e.g. migrate/seed error or missing env). Ensure the service deploys from the branch that has the PORT fix (e.g. `feature/agent-forge`).
--- ---
## Generate random strings (for ACCESS_TOKEN_SALT and JWT_SECRET_KEY) ## Generate random strings (for ACCESS_TOKEN_SALT and JWT_SECRET_KEY)

5
docker/entrypoint.sh

@ -2,11 +2,12 @@
set -ex set -ex
echo "Entrypoint: PORT=${PORT:-not set}"
echo "Running database migrations" echo "Running database migrations"
npx prisma migrate deploy npx prisma migrate deploy
echo "Seeding the database" echo "Seeding the database"
npx prisma db seed npx prisma db seed || echo "Seed failed (non-fatal), continuing..."
echo "Starting the server" echo "Starting the server on port ${PORT:-3000}"
exec node main exec node main

Loading…
Cancel
Save