The example can (mostly) be run in cluster mode to scale h5p horizontally.
The only thing that hasn't been made to work across is the configuration object. (This shouldn't be a problem, as the only thing that is written back in the config is the UID of the server, which is already built in for development purposes.) All other components support scaling across several instances.
You'll need:
You can access the application by calling http://localhost:8080 from your browser.
Change directories to the directory that contains the docker-compose.yml
file.
(packages/h5p-examples/cluster-mode
)
docker-compose up --scale h5p=4
Execute this command after you've made changes to the code that require a rebuild
docker-compose up --scale h5p=4 --build
docker-compose down
docker-compose down -v
The docker-compose.yml
file configures a setup in which there are several
services that make @lumieducation/h5p-server work in cluster mode: