Issues deploying Comentario, secrets.yaml

candide
HOBBYOP

a month 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 Bounty

10 Replies

Railway
BOT

a month 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!


a month 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.

candide
HOBBYOP

a month 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:              8080

I'm still getting the same log error:

Failed to post-process configuration: open secrets.yaml: no such file or directory


a month 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.

candide
HOBBYOP

a month 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 envsubst if 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?

25 days 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.

candide
HOBBYOP

23 days ago

Fantastic, your template works! Thank you! I'll add a button to the Comentario docs


Status changed to Solved uxuz 23 days 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.

candide
HOBBYOP

23 days 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 23 days 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

22 days ago

Just did, can you confirm?


passos

Just did, can you confirm?

candide
HOBBYOP

22 days ago

I see it, perfect!


Loading...
Issues deploying Comentario, secrets.yaml - Railway Help Station