RAILWAY_PUBLIC_DOMAIN Variable before setting up the auto generate public domain
simply-acca
HOBBYOP

a year ago

In my service I have added the variable :

URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"

and then when I deploy my repository it failed because RAILWAY_PUBLIC_DOMAIN is empty and therefore URL as well.

It works perfectly fine if I set RAILWAY_PRIVATE_DOMAIN.

The problem is that I cannot create a auto generate domain before deployment so my question is:

is it possible to reference the RAILWAY_PUBLIC_DOMAIN before I deploy or am I misunderstanding the concept ?

I am trying to deploy Strapi from my repository. I cloned the repository from the template:

https://github.com/railwayapp-templates/strapi?tab=readme-ov-file

I wonder what I am doing wrongly.

Thanks for your help.

2 Replies

a year ago

You can.

The meta for efficient new deployments -

(Skip step 1 & 2 if you already have a project in use)

  1. Create an empty project.

  2. Name the project.

  3. Create an empty service.

  4. Name the service

  5. Add needed variables.

  6. Add any other service level config such as build or start commands, health checks, etc.

  7. Deploy (At this stage nothing will actually deploy)

  8. Add domain.

  9. Add repo / image source.

  10. Deploy. (this will now deploy your app, with the domain previously setup in step 8)

This way you have everything setup and in place for the first deploy.


simply-acca
HOBBYOP

a year ago

Perfect. Thx for your quick reply. Very appreciate your support.


Loading...