2 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
10 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
2 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.
2 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
2 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.
2 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?
2 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/comentarioIf you've any questions about it, feel free to ask it in here.
2 months ago
Fantastic, your template works! Thank you! I'll add a button to the Comentario docs
Status changed to Solved uxuz • about 2 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/comentarioIf you've any questions about it, feel free to ask it in here.
2 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 • about 2 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
2 months ago
Just did, can you confirm?
passos
Just did, can you confirm?
a month ago
I see it, perfect!