简体   繁体   中英

Changing Jelastic Node.js root folder

I am trying to deploy a React app in my Jelastic Node.js server but I am not being able to make it work.

I am using vite for building. To test the deployment, I am building my app on my local environment and deploying the build directory into the Node.js server which works fine sometimes but sometimes it too doesn't work and the site is unreachable. I don't know what causes this.

But I want to make this process automatic and set the root directory to dist directory which is default build directory for vite so that I could pull it from GitHub and run build command and deploy it automatically. I searched for changing the configurations in Jelastic Node.js but couldn't find any relating to this issue.

You can either a) add VCS project into any non ROOT context, and for ROOT create a symlink through WebSSH (but this can cause downtime during deployment) or b) add VCS project into any non ROOT context and add a deployment hook to which copy content from dist into ROOT (and in this case downtime is minimized).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM