Deploying Bubify for Production
Prerequsites
You need to have Docker installed and at least 4 GB of memory during building. We recommend only deploying on Linux hosts for performance reasons.
Installing
Clone the project:
Then go into the bubify-docker
folder get the latest updates
Additionally, copy the environment template for production.
In .env.production
you need to change all occurrences of example.com
to your own domain. For https
you have three choices: (1) use own certificate, (2) use certbot
for using free Let’s Encrypt certificates or (3) let another reverse-proxy handle encryption.
Here is how to resolve these strategies:
- In
docker-compose.yml
uncomment and change- my_domain.crt:/home/bubify/ssl.crt
and- my_domain.ssl:/home/bubify/ssl.key
to point to your own - Here is one example of how
certbot
can be used - Should work out of the box. Just point the other reverse proxy at port 80 on your Docker host.
Unless you uncomment and link in your own certificates the default generated certificate is used which is valid for localhost
. This is to allow ease of use when testing production environment on a developer machine.
After you have resolved the certificate can now build the docker compose project and start it as a deamon
You may continuously track the logs for the frontend and backend
You may now run the initial setup wizard. But note that the backend server must have finished its initial initalization.
You may also populate with users and achievements. Replace backend/toolbox/achievements.csv
and backend/toolbox/users.csv
with your own configuration.
Warning
Do not run add-user
or add-achievement
before setup
as this might corrupt your installation state
If achievements or new users are not appearing in the frontend try clearing your browser's cache and restarting the backend with
If you wish to stop the containers you can do so with
Cleaning
Only do manual cleaning. Do not use the clean commands as these will pruge the database.