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
Set PORT=8080 in Railway
I added a PORT variable set to 8080, but the deployment is still not working
It won't dial on your local connection first of all
It's trying to dial on 6520
![](https://utfs.io/f/69b36fdd-ff30-4357-a8f0-ed87b731bb5b-3n3kiu.00.522x.png)
You gotta pipe in whatever env is required to set the database host to PG_HOST
The only env the application has for databases is the following:
COMMENTO_POSTGRES: A PostgreSQL server URI, including the database nameSource: https://docs.commento.io/configuration/backend/#configuration-file I copied the exact Postgres Connection URL provided by Railway
![](https://utfs.io/f/2f8f4dc2-dd9d-4799-8bbb-e60a07bd8e1b-4pl4mu.png)
![](https://utfs.io/f/ff1615f4-e940-42b8-8793-6520d60cb170-4pl4mu.png)
Yea so you wanna add that to the service Variables
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
COMMENTO_POSTGRES
: ${{ DATABASE_URL }}
Yes, I did this from the start. I mentioned this in the original post.
Right but
It's not there
Look at your variables
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 !
haha all good my friend!
Did it work?
Oh hey, looks like it did!
![](https://utfs.io/f/f2303322-db68-4584-b9c2-2cd1eb09a0f2-dxc68s.13.022x.png)
Congrats!
Yes, it works. Thank you so much for your help and patience!
I'm looking into making this a template for other users π
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.