R
Railwayβ€’6mo ago
Yashu

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
Percy
Percyβ€’6mo ago
Project ID: N/A
Brody
Brodyβ€’6mo ago
you mean to say you already have the built static files in git?
Yashu
YashuOPβ€’6mo ago
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 caddy
Brody
Brodyβ€’6mo ago
any reason why you don't have railway build the spa app?
Yashu
YashuOPβ€’6mo ago
As far, I know railway doesn't support deployment of static pages. Right?
Brody
Brodyβ€’6mo 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
Yashu
YashuOPβ€’6mo ago
hmm... let me try it
Brody
Brodyβ€’6mo 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
Yashu
YashuOPβ€’6mo ago
railway is more or less just a generic deployment platform
in 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.
Brody
Brodyβ€’6mo ago
not that simple unfortunately yes but that's for create react app, did you want the link for a vite spa?
Yashu
YashuOPβ€’6mo ago
I got that running, thanks for the help πŸ™‚
Brody
Brodyβ€’6mo ago
what was the final solution?
Yashu
YashuOPβ€’6mo ago
I use this https://github.com/brody192/create-react-app-starter as an example to deploy a Vite react SPA on caddy πŸ‘Œ
Brody
Brodyβ€’6mo ago
haha you could have just asked me for the vite version
Yashu
YashuOPβ€’6mo ago
Please do share that as well, maybe I can find something new! πŸ™‚
Want results from more Discord servers?
Add your server