Skip to main content
Version: 1.2

Docker

Docker installation​

More information on supported platforms and installation guides on the official Docker documentation https://docs.docker.com/engine/install/

Ubuntu​

To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:

  • Ubuntu Oracular 24.10
  • Ubuntu Noble 24.04 (LTS)
  • Ubuntu Jammy 22.04 (LTS)
  • Ubuntu Focal 20.04 (LTS)
Set the Docker apt repository:​
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
To install the latest version, run:​
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Verify that the installation is successful with:​
sudo docker run hello-world

Debian​

To install Docker Engine, you need the 64-bit version of one of these Debian versions:

  • Debian Trixie 13 (testing)
  • Debian Bookworm 12 (stable)
  • Debian Bullseye 11 (oldstable)
Set up Docker's apt repository:​
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
To install the latest version, run:​
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Verify that the installation is successful with:​
sudo docker run hello-world

Red Hat​

To install Docker Engine, you need a maintained version of one of the following RHEL versions:

  • RHEL 8
  • RHEL 9
Set up the repository​

Install the dnf-plugins-core package (which provides the commands to manage your DNF repositories) and set up the repository.

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
To install the latest version, run:​
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

This command installs Docker, but it doesn't start Docker.

Start Docker Engine:​
sudo systemctl enable --now docker
Verify that the installation is successful with:​
sudo docker run hello-world

Fedora​

To install Docker Engine, you need a maintained version of one of the following Fedora versions:

  • Fedora 42
  • Fedora 41
  • Fedora 40
Set up the repository​

Install the dnf-plugins-core package (which provides the commands to manage your DNF repositories) and set up the repository.

sudo dnf -y install dnf-plugins-core
sudo dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

To install the latest version, run:​
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

This command installs Docker, but it doesn't start Docker.

Start Docker Engine:​
sudo systemctl enable --now docker
Verify that the installation is successful with:​
sudo docker run hello-world

Windows​

Prerequisites:

  • A 64-bit version of Windows 10 or newer
  • CPU with virtualization support
  • WSL 2 enabled

To install WSL on windows run on a cmd

wsl --install

If you have WSL already installed ensure it's updated to WSL 2

wsl --update
wsl --set-default-version 2

Download and Install Docker Desktop from the official website https://docs.docker.com/get-started/get-docker/

Follow the prompts to install Docker Desktop, ensuring "Install required Windows components for WSL 2" is checked.

Restart if needed.

Verify that both Docker and Docker compose are installed with:

docker --version
docker compose version
docker run hello-world

Deploy ToBeAlert​

After Docker Engine is installed, deploy ToBeAlert with Docker Compose.

1. Choose an installation directory and prepare host folders​

Pick any directory on the host where you will keep docker-compose.yaml and local bind mounts. There is no fixed folder name or path — the examples below use the shell variable INSTALL_PATH; set it to whatever you prefer (for example /opt/tobealert or ~/tobealert).

export INSTALL_PATH=/opt/tobealert   # example only — change to your chosen path

mkdir -p "$INSTALL_PATH/data/backups"
sudo chown -R 1000:1000 "$INSTALL_PATH/data/backups"
sudo chmod -R 775 "$INSTALL_PATH/data/backups"

The backend runs as UID 1000. The bind mount for backups must be writable by that user.

Configuration (/tobealert/config/tobealertd.conf) is created automatically on first start inside the container. You do not need to mount a config volume unless you want to persist edits on the host.

2. Log in to Docker Hub​

docker login -u YOUR_USERNAME

3. Create docker-compose.yaml​

Save the following as docker-compose.yaml inside $INSTALL_PATH (the directory you chose in step 1). Paths in the file such as ./data/backups are relative to that file — they are not tied to a specific host path name.

networks:
tobealert-network:
driver: bridge

services:
tobealert-bbdd:
image: postgres:17.5-alpine
container_name: tobealert-bbdd
environment:
POSTGRES_USER: tobealert
POSTGRES_PASSWORD: tobealert
POSTGRES_DB: tobealert
TZ: Europe/Madrid
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tobealert"]
interval: 2s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- tobealert-network

tobealert-redis:
image: redis:latest
container_name: tobealert-redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 5
restart: unless-stopped
networks:
- tobealert-network

tobealert-backend:
image: tobek8s/tobealert-backend:latest
container_name: tobealert-backend
environment:
ADMIN_USER: tbadmin
ADMIN_PASSWORD: changeme
DATABASE_URL: postgres://tobealert:tobealert@tobealert-bbdd:5432/tobealert
REDIS_HOST: tobealert-redis
REDIS_PORT: "6379"
TIMEZONE: Europe/Madrid
ports:
- "9000:9000"
volumes:
- ./data/backups:/tobealert/backups
- tools_data:/tobealert/tools
- license_data:/tobealert/license
- instructions_data:/tobealert/instructions
depends_on:
tobealert-bbdd:
condition: service_healthy
tobealert-redis:
condition: service_healthy
restart: unless-stopped
networks:
- tobealert-network

tobealert-frontend:
image: tobek8s/tobealert-frontend:latest
container_name: tobealert-frontend
environment:
BASE_URL: http://localhost
API_URL: http://localhost:9000
BACKEND_SERVICE: tobealert-backend
BACKEND_PORT: "9000"
ports:
- "8005:8080"
depends_on:
- tobealert-backend
restart: unless-stopped
networks:
- tobealert-network

volumes:
postgres_data:
tools_data:
instructions_data:
license_data:

Change ADMIN_PASSWORD for your environment.

4. Environment variables (summary)​

ServiceVariableValue in example above
BackendADMIN_USER / ADMIN_PASSWORDBootstrap admin
BackendDATABASE_URLpostgres://tobealert:tobealert@tobealert-bbdd:5432/tobealert
BackendREDIS_HOSTtobealert-redis (Compose service name, not localhost)
BackendREDIS_PORT6379
FrontendBASE_URLURL for the browser (UI)
FrontendAPI_URLhttp://localhost:9000 (URL for API calls from the browser)
FrontendBACKEND_SERVICEtobealert-backend — nginx uses http://tobealert-backend:9000
FrontendBACKEND_PORT9000

Full reference: Settings file and environment variables.

5. Start the stack​

Run Compose from $INSTALL_PATH (where docker-compose.yaml lives):

cd "$INSTALL_PATH"
docker compose up -d

Check logs (from the same directory):

docker compose logs -f tobealert-backend

Health check:

curl -s http://localhost:9000/api/management/healthcheck

Open the UI at http://localhost:8005/tobealert (mapped port 8005 → container 8080).

6. First start behaviour​

On first backend start, the entrypoint:

  1. Copies /tobealert/config/tobealertd.conf.example → /tobealert/config/tobealertd.conf (if missing)
  2. Replaces SECRET_KEY = 'CHANGEME' with a random key
  3. Creates the admin user from ADMIN_USER / ADMIN_PASSWORD

Other platforms​

  • Linux — same variables; external PostgreSQL or network_mode: host notes
  • Windows — same layout; example host paths such as C:/tobealert/...
  • Kubernetes — manifests; BACKEND_SERVICE = Kubernetes Service name