Skip to content

Installing Cloudlog with Docker

The repository includes a Docker setup. It starts Cloudlog and MariaDB on the computer in front of you, and opens the logbook in a browser. Development is done on the dev branch, and this is the setup used for that work.

You need Docker, with Compose. On Windows and Mac that is Docker Desktop. On Linux it is the Docker engine and the Compose plugin.

If you would prefer someone else to run the server, magicbug offer hosted Cloudlog.

1. Get the dev branch

git clone -b dev https://github.com/magicbug/Cloudlog.git
cd Cloudlog

If the folder is already on this computer, switch into it and check out dev:

git checkout dev

2. Create the environment file

Docker reads a file named .env. Copy the sample:

cp .env.sample .env

On Windows PowerShell:

Copy-Item .env.sample .env

Open .env before the first start. The database is created from these values, and Cloudlog's config is written from them. Changing them later does not rewrite a database that already exists.

  • MYSQL_ROOT_PASSWORD, MYSQL_USER, and MYSQL_PASSWORD are the database passwords. The sample values are fine on a computer only you use. Change them when anyone else can open port 80.
  • MYSQL_DATABASE can stay cloudlog.
  • MYSQL_HOST stays db. That is the name of the database container, and Cloudlog reaches it by that name.
  • BASE_LOCATOR is your home grid, for example IO87IP. The sample is only a placeholder.
  • WEBSITE_URL stays http://localhost when you open the site on this computer.
  • DIRECTORY stays /var/www/html. That is the folder inside the container.

3. Start it

From the same folder:

docker compose up

The first start builds the images. PHP 8.5 and MariaDB are downloaded, so it takes a few minutes. Later starts are quicker. Add -d if you want the containers to keep running after you close the terminal:

docker compose up -d

Cloudlog listens on port 80. Open http://localhost.

If something else is already using port 80, change the published port in docker-compose.yml from "80:80" to "8080:80", set WEBSITE_URL to http://localhost:8080, and open that address.

4. Log in

The database is loaded from Cloudlog's install script, so the install wizard does not appear. Log in with the demo account, m0abc / demo, then do the same four jobs as any other install:

  1. Create your own login and delete the demo user.
  2. Update the country files, from the Admin menu.
  3. Create a station location and set it active.
  4. Create a station logbook, link that location, and set the logbook active.

The first start writes application/config/config.php and application/config/database.php in this folder. They contain the database password. Leave them out of anything you publish.

Stopping and updating

docker compose stop stops the containers. The contacts stay in the Docker volume named db_data. docker compose down also keeps that volume. docker compose down -v deletes it, and the log goes with it.

To pick up new code, stay on dev, pull, and start again:

git pull
docker compose up -d

When Dockerfile or Dockerfile-db has changed, rebuild:

docker compose up -d --build