8 months ago
Hi! I'm having trouble deploying Commentario on Railway.
I used the following Docker image: registry.gitlab.com/comentario/comentario:latest-ubuntu
I also deployed a Postegres database, and added the following env vars to the docker, per their docs:
host: ${{Postgres.PGHOST}}
port: 5432
database: ${{Postgres.PGDATABASE}}
username: ${{Postgres.PGUSER}}
password: ${{Postgres.PGPASSWORD}}
I then added a domain at port 8080.
However, accessing the deployment domain throws a 502 Bad Gateway error, and the logs display the following:
Failed to post-process configuration: open secrets.yaml: no such file or directory
Pinned Solution
8 months ago
Hey, I've taken the time to create a template for Comentario. Feel free to deploy it with just one click.
https://railway.com/deploy/comentario
If you've any questions about it, feel free to ask it in here.
10 Replies
8 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 502 Bad Gateway Error Despite Server Running Successfully
- 🧵 Deploy laravel apps 502 Bad Gateway
- 🧵 502 Bad Gateway Error
If you find the answer from one of these, please let us know by solving the thread!
8 months ago
Hey, are you sure that Comentario listens on port 8080 by default? Per their docs, they'll listen on a random port unless you specify the PORT environment variable.
passos
Hey, are you sure that Comentario listens on port 8080 by default? Per their docs, they'll listen on a random port unless you specify the `PORT` environment variable.
8 months ago
I've added the PORT env variable, and changed the other variables as follows:
postgres.host: ${{Postgres.PGHOST}}
postgres.port: 5432
postgres.database: ${{Postgres.PGDATABASE}}
postgres.username: ${{Postgres.PGUSER}}
postgres.password: ${{Postgres.PGPASSWORD}}
PORT: 8080I'm still getting the same log error:
Failed to post-process configuration: open secrets.yaml: no such file or directory
8 months ago
Sorry, I totally missed the secrets.yaml error. May I ask how you're transporting that YAML to the Docker image? According to their documentation, you'll need to copy secrets.yaml inside the container. Also, I don't see any mention of support for environment variables inside secrets.yaml, but you can use envsubst if necessary, which will essentially convert the YAML with the current environment variables.
passos
Sorry, I totally missed the `secrets.yaml` error. May I ask how you're transporting that YAML to the Docker image? According to their documentation, you'll need to copy `secrets.yaml` inside the container. Also, I don't see any mention of support for environment variables inside secrets.yaml, but you can use `envsubst` if necessary, which will essentially convert the YAML with the current environment variables.
8 months ago
I haven't transported it -- I'm not sure how to. I thought adding env variables could work in its place, but I guess not lol. How can I create/copy the secrets.yaml into the container on Railway?
you can use
envsubstif necessary, which will essentially convert the YAML with the current environment variables.
How do I do this?
candide
I haven't transported it -- I'm not sure how to. I thought adding env variables could work in its place, but I guess not lol. How can I create/copy the `secrets.yaml` into the container on Railway? > you can use `envsubst` if necessary, which will essentially convert the YAML with the current environment variables. How do I do this?
8 months ago
Hey, I've taken the time to create a template for Comentario. Feel free to deploy it with just one click.
https://railway.com/deploy/comentario
If you've any questions about it, feel free to ask it in here.
passos
Hey, I've taken the time to create a template for Comentario. Feel free to deploy it with just one click. <https://railway.com/deploy/comentario> If you've any questions about it, feel free to ask it in here.
8 months ago
Fantastic, your template works! Thank you! I'll add a button to the Comentario docs
Status changed to Solved uxuz • 8 months ago
passos
Hey, I've taken the time to create a template for Comentario. Feel free to deploy it with just one click. <https://railway.com/deploy/comentario> If you've any questions about it, feel free to ask it in here.
8 months ago
Could you add the following env variable to the template? :
BASE_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"
It'll help with generating the correct installation script, since the default is localhost
Status changed to Awaiting Railway Response Railway • 8 months ago
candide
Could you add the following env variable to the template? : `BASE_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"` It'll help with generating the correct installation script, since the default is localhost
8 months ago
Just did, can you confirm?
passos
Just did, can you confirm?
8 months ago
I see it, perfect!