R
Railwayβ€’2y ago
candide

Unable to migrate Commento++ Heroku project to Railway

Hello! I'm trying to migrate and deploy the following app, which has a "Deploy to Heroku button": https://github.com/souramoo/commentoplusplus I followed the Heroku migration guide, set up a Postgres database, and replaced the old Heroku db link with the new Railway one. However, I get an application error when I try to visit the project URL. Project ID: 2dbe4a9c-5106-460c-9955-91d50b44d736
17 Replies
JustJake
JustJakeβ€’2y ago
Set PORT=8080 in Railway
candide
candideβ€’2y ago
I added a PORT variable set to 8080, but the deployment is still not working
JustJake
JustJakeβ€’2y ago
It won't dial on your local connection first of all
JustJake
JustJakeβ€’2y ago
It's trying to dial on 6520
JustJake
JustJakeβ€’2y ago
You gotta pipe in whatever env is required to set the database host to PG_HOST
candide
candideβ€’2y ago
The only env the application has for databases is the following:
COMMENTO_POSTGRES: A PostgreSQL server URI, including the database name
Source: https://docs.commento.io/configuration/backend/#configuration-file I copied the exact Postgres Connection URL provided by Railway
JustJake
JustJakeβ€’2y ago
Yea so you wanna add that to the service Variables
JustJake
JustJakeβ€’2y ago
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
JustJake
JustJakeβ€’2y ago
COMMENTO_POSTGRES: ${{ DATABASE_URL }}
candide
candideβ€’2y ago
Yes, I did this from the start. I mentioned this in the original post.
JustJake
JustJakeβ€’2y ago
Right but It's not there Look at your variables
candide
candideβ€’2y ago
Ohhhh, my bad! I put the database URL under a variable that came with Heroku instead of adding COMMENTO_POSTGRES. So sorry about that Cooper !
JustJake
JustJakeβ€’2y ago
haha all good my friend! Did it work?
JustJake
JustJakeβ€’2y ago
Oh hey, looks like it did!
JustJake
JustJakeβ€’2y ago
Congrats!
candide
candideβ€’2y ago
Yes, it works. Thank you so much for your help and patience! I'm looking into making this a template for other users πŸ™‚
candide
candideβ€’2y ago
Here is the template starter for Commento++: https://railway.app/new/template/hame0C?referralCode=7ENqQl
Railway
commento++
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.