Spanish Total.js
English
Documentation For AI agents
Contents

Deploy with bundles

Pack the app and its plugins into bundle files and run them on another server.

.md GitHub
On this page

A bundle is one file that holds part of the app. The script bundle.sh makes one bundle for the app itself and one for each plugin. On the server, you choose which plugin bundles to install.

Make the bundles

In the app folder, run:

node bundle.sh

The script writes the bundles to the folder --bundles--:

  • app.bundle: the app with the Settings plugin.
  • One file for each other plugin, for example admin.bundle, products.bundle and profiles.bundle.

admin.bundle holds the sign-in page and the admin account. Always install it unless you use OpenPlatform: without it, the admin opens for anyone with no sign-in.

Run the bundles on a server

1. Create a folder for the app with a subfolder bundles.

2. Copy into the app folder the files index.js, package.json and config from Pluginable.

3. Copy app.bundle, admin.bundle and the plugin bundles you want into bundles.

4. Set database in config to an empty PostgreSQL database.

5. The bundles do not create the database table, so run the file database.sql from Pluginable once, for example with psql:

psql postgresql://user:password@localhost:5432/pluginable -f database.sql

6. In the app folder, install the dependencies and start the app:

npm install
node index.js 8000 --release

On start, Pluginable unpacks the bundles into the folder .src and runs from there. The menu shows only the plugins whose bundles you installed.

To update a plugin, make the bundles again, replace its file in bundles and restart the app.

Made in Europe