-
Notifications
You must be signed in to change notification settings - Fork 16
Setup BNote with Docker
BNote comes with a Dockerfile and a docker-compose.yml file that allows you to set up a basic docker environment to start BNote quickly. Here is a quick start guide on how to do this.
This guide assumes you have docker installed on your system. You can validate that by opening a terminal/command prompt and enter
docker --version
. If it shows something like this, you're good: Docker version 19.03.13, build 4484c46d9d
.
Let's get started:
- Clone the BNote repository to your disk:
git clone https://github.com/mattimaier/bnote.git
. Alternatively you can just download the latest release and unzip that on your disk. - In your terminal/comand promt change to the BNote directory, e.g.
cd /home/myuser/git/bnote
- Change the docker-compose.yml file with a sensible password for the database ROOT and bnote user.
- Build the BNote docker image:
docker build .
This could take a bit... - Start two containers (one is bnote itself, the other one the database) using docker-compose:
docker-compose up
- Wait for the entire thing to start. Now enter in your browser: http://localhost/BNote
Quite a few things can go wrong. Here are some common issues:
At first try http://localhost/bnote with lower case letters - just in case. Then it could be that port 80 is already bound. Stop the containers by entering docker-compose stop
, then change the external port in the docker-compose.yml file to something that is not used on your machine already, e.g. 8088 and bring the containers up again.
Warning: mysqli_connect(): (HY000/2002): No such file or directory in /var/www/html/BNote/src/data/database.php on line 35
This is caused by the database driver of BNote not being able to connect to the database. Please start the setup again and make sure your BNote/bnote/config directory has no database.xml file yet: http://localhost/BNote/install.php
Stand: 21.09.2020, BNote Version 3.4.4