With time, this guide will be updated with more ways of deploying. Any PR is welcome!
Building the app
Follow the Getting Started guide to set up the project somewhere on your server. Please note that you have to set all the production environment variables in this case. Keep in mind that the tools used in this guide are used as an example but they work really well. There might be multiple other tools that you can use, so feel free to do so if you wish.Serving the app
This guide is tried and tested with Ubuntu. The settings should be the same on all operating systems, but some of the files and commands may vary.Backend
The backend doesn’t need to undergo a build process. You need the following things to make sure it can be served:- MySQL running
- A database is created so that Chartbrew can use it (it must be empty if it wasn’t used by Chartbrew before)
npm installran in the server folder ornpm run setupin the project root folder- Environment variables are set for Production (check
.env-templatein the root folder to see which)
npm run start, or use an external tool like pm2 to monitor and manage Node apps better.
port specified in server/settings.js.
Frontend
The Frontend app needs to be built and then served using pm2 like above.pm2 configuration file:
-l is the same as the VITE_APP_CLIENT_PORT in your .env file.
Now you can start the front-end app with pm2 start app.config.json
Using the methods above, the app can be accessed on localhost. To serve it on a domain, check the deployment guides for different platforms in the sidebar.