Deploy static site after CI build
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.
16 Replies
Project ID:
N/A
you mean to say you already have the built static files in git?
I have the SPA source code in the git, and I built the
dist/output
using CI/CD
not sure, how to deploy that to Railway using caddyany reason why you don't have railway build the spa app?
As far, I know railway doesn't support deployment of static pages.
Right?
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
hmm... let me try it
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
railway is more or less just a generic deployment platformin that case, what would be the
start
comand for running the Vite based SPA app
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.not that simple unfortunately
yes but that's for create react app, did you want the link for a vite spa?
I got that running, thanks for the help π
what was the final solution?
I use this https://github.com/brody192/create-react-app-starter as an example to deploy a Vite react SPA on caddy
π
haha you could have just asked me for the vite version
Please do share that as well, maybe I can find something new! π
Solution