R
Railway

✋|help

Railway Strapi

FFNDEVVE9/13/2023
Hi. It's taken me entire day and I think I am getting close. I deployed Strapi with postgres on Railway - everything is okay. First issue was getting that thing to be in development mode so I can add new content-types, I did it by modifying package.json like in this tutorial: https://dev.to/candidosales/deploying-strapi-4-to-railway-589b

Everything worked till first "rebuild". DB is wiped, starting from 0. I read about this issue and I really have no idea what to do. Even if I did data transfer from local version like this: https://docs.strapi.io/dev-docs/data-management/transfer there would be schema issues (for example there wouldn't be "post" types created). I have truly no idea what to do.
FFNDEVVE9/13/2023
7a9a91c1-3dbb-499f-ab6a-50767c5b05d0
I spent last 30 minutes on reading strapi issues/thoughts and one thing that @Brody said made me wonder - if I clone the repo to my own PC and I run it in development mode, make some changes (it should be connected to postgres railway DB) and then i change back to production and push it should work?
BBrody9/13/2023
thats correct
run in development mode locally with railway run strapi develop so that strapi has access to the database credentials from railway.
make sure your start script is set to strapi start so when you deploy to railway its run in production mode
FFNDEVVE9/13/2023
i dont get it, i linked railway to project
and i cant do anything
how do i download it, its weird
FFNDEVVE9/13/2023
FFNDEVVE9/13/2023
Ok, I had to clone repo, run npx railway here and its slowly getting to work i think
i will journalize my efforts here - now i will run 'npx railway run strapi develop', add some stuff, then push github and hopefully mt DB doesnt get wiped
also updated strapi to 4.13.5 and pgsql to new version with yarn install, pushed and it also worked - miracle
now final test, if i add new content on railway in PROD mode will it stay after "rebuild"
TThallesComH9/13/2023
Also I don't recommend using your production database to develop locally, I recommend using SQLite.
Docs: https://docs.strapi.io/dev-docs/configurations/database
FFNDEVVE9/13/2023
at this point i just want it to work 😄 its literally portfolio project because im looking for a front-end job and i coded nice react blog with strapi
yoo looks like it works
thank u @Brody so much, without all your replies to people aruond i'd never do it
it FU**ING WORKS
BBrody9/13/2023
that's awesome!!
FFNDEVVE9/14/2023
@Brody
https://erryf-magazine.vercel.app/
Thank you for making it possible
BBrody9/14/2023
looks like you have some styling issues to sort out
FFNDEVVE9/14/2023
its not responsive yet
it will be, but just wanted it to "be alive" as its my first next.js project ever
BBrody9/14/2023
pretty damn good for your first next project
FFNDEVVE9/14/2023
after 3 days of fighting strapi making it responsive is the easiest part
(note: i was designing simple bootstrap html landing pages for last 7 years and this year i decided to learn real javascript + react)
BBrody9/14/2023
I still don't know real JavaScript+React
FFNDEVVE9/14/2023
u know how to set up strapi
that puts u ahead of 99% 😄
BBrody9/14/2023
I've also never used strapi
FFNDEVVE9/14/2023
damn!
BBrody9/14/2023
I've only read their documentation
so that reminds me, do you have pool.min set to 0 in your database.js file?
FFNDEVVE9/14/2023
yes sir
thank u for being cautious
i copied official strapi railway repo
BBrody9/14/2023
perfect then I'm glad I put the pool min thing in the template

Looking for more? Join the community!

Recommended Posts
Logs down?I haven't been able to see any logs, deploy or build or observability for the past 15 minDeploy from Gitlab failsI am getting the error: error sending request for url (https://backboard.railway-develop.app/graphRailway Github ActionHey i followed the blog online and am trying to deploy my railway app under a `backend/` directory iBuild slowHi, ive pushed some updates to my sveltekit app that makes my buildtime about 4 minutes for some reaIssue Deploying Laravel PHPHello, i'm trying to deploy an already existing project made in PHP, using Laravel, and i'm trying tCustom domain not showing CNameHi! Just wanted to deploy our main app to Railway but when adding a custom domain it shows an error custom domain via googleHi! I am trying to deploy to a custom domain managed by google, and saw a bunch of posts about issueenvironments are linked together?I've two environments, production and development. If I delete one service in development, it shoulDeployment stuck at building phaseDeployments are stuck at #3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1693872Outbound traffic to Google Pub/Sub limitedProject id: bc848a89-1faa-4b26-af86-58c13f7a2e99 I am using using google pub/sub with pull subscripAccessing secret env variables during build step```toml [variables] GOPRIVATE="github.com/stroomnetwork" STROOM_REPOS_ACCESS_KEY="ghp_THIS is Secretidle cron job resource usuageim playing around with cron jobs, and they seem to be using around 200mb of ram idly even when not rMixed Content error: HTTP vs. HTTPSI have a Railway/React/Vite frontend accessing a Railway/Fastapi backend, and my frontend receives tDeployment fails when pulling nixpack imageDeployments are failing on this internal build step: #3 [internal] load metadata for ghcr.io/railwayUnable to find PostgreSQL client librarySetting up a Rails + Postgres app but deployment is failing due to an "Unable to find PostgreSQL cliInactive deployment stuck in "waiting"I have an old deployment stuck in a "waiting" status. I was doing some empty commit on my github repLogs not showingAre there problems with the logs? In all my projects logs have stopped showing since ``Sep 12 12:32Trouble unlinking DiscordTrying to unlink discord so that I can link another account, but its not letting me disconnect the cpostgres db service not accessible from my clientThis morning, the DB refuses to accept connections and when I checked the logs, I saw this: does thinginx revere proxy 503 errorHi! I wanted to set up a reverse NGINX proxy with mixpanel. I used the dockerfile provided by them