2 years ago
I have already seen few templates from Railway & the community for deploying static site to Caddy or Nginx.
But in cases the static files are already been version controlled in Git.
Where as, I have a Vite react application, which I would like to deploy using Caddy.
But not sure, how to do that.
21 Replies
2 years ago
you mean to say you already have the built static files in git?
2 years ago
n/a
2 years ago
I have the SPA source code in the git, and I built the dist/output using CI/CD
2 years ago
not sure, how to deploy that to Railway using caddy
2 years ago
any reason why you don't have railway build the spa app?
2 years ago
As far, I know railway doesn't support deployment of static pages.
2 years ago
Right?
2 years ago
unlikely vercel, railway is more or less just a generic deployment platform, it's up to you to come up with a deployment strategy that will run an spa app
2 years ago
hmm… let me try it
2 years ago
so with that said, I have a ready made drag and drop solution for you if you are okay with railway building the spa app instead of ci/cd
2 years ago
railway is more or less just a generic deployment platform
in that case, what would be thestartcomand for running the Vite based SPA app
2 years ago
I found your repo for deploying a CRA on Railway, https://github.com/brody192/create-react-app-starter
I will try using this as an example.
2 years ago
not that simple unfortunately
2 years ago
yes but that's for create react app, did you want the link for a vite spa?
2 years ago
I got that running, thanks for the help 🙂
2 years ago
what was the final solution?
2 years ago
I use this https://github.com/brody192/create-react-app-starter as an example to deploy a Vite react SPA on caddy
2 years ago
👌
2 years ago
haha you could have just asked me for the vite version
2 years ago
Please do share that as well, maybe I can find something new! 🙂
2 years ago