plouc / mozaik-demo

Sample mozaïk app with two dashboards
http://mozaik.rocks/
103 stars 75 forks source link

How to create a production build? #22

Closed ghost closed 5 years ago

ghost commented 5 years ago

I see that there is an output folder "build" created after i ran npm build. When i copy the whole build folder contents and placed under a webserver root,

I manually copied the node_modules but i am not sure how to place configuration. Copying conf folder doesn't solve the issue. Please help.

plouc commented 5 years ago

The build folder contains the UI, not the node_modules and such, you need the UI + the regular server with its node_modules. Providing a build folder with embedded node_modules would be a very bad practice as native modules are platform dependent, if you want a packaged version of Mozaik, you should use Docker.

ghost commented 5 years ago

Thank you. How about configuration? where should i place in the server? I am considering CI/CD for preparing a production-ready build.

plouc commented 5 years ago

It depends on what you're trying to do and how much flexibility you want, if using Docker you could for example mount a volume which contains the config.