2 years 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
2 years ago
You can.
The meta for efficient new deployments -
(Skip step 1 & 2 if you already have a project in use)
- Create an empty project.
- Name the project.
- Create an empty service.
- Name the service
- Add needed variables.
- Add any other service level config such as build or start commands, health checks, etc.
- Deploy (At this stage nothing will actually deploy)
- Add domain.
- Add repo / image source.
- 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.
