From 169dad96315167840d88732d4d467b5503951c5c Mon Sep 17 00:00:00 2001 From: StefVdHaute Date: Sun, 31 Mar 2024 16:06:04 +0200 Subject: [PATCH] merge with kimai docker compose --- docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b1402c2..1d8d302 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,36 @@ services: - simple-kimai-kiosk: - container_name: my-nginx-container + sqldb: + image: mysql:5.7 + volumes: + - mysql:/var/lib/mysql + environment: + - MYSQL_DATABASE=kimai + - MYSQL_USER=kimaiuser + - MYSQL_PASSWORD=kimaipassword + - MYSQL_ROOT_PASSWORD=changemeplease + command: --default-storage-engine innodb + restart: unless-stopped + healthcheck: + test: mysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost + interval: 20s + start_period: 10s + timeout: 10s + retries: 3 + + kimai: + image: kimai/kimai2:apache + volumes: + - data:/opt/kimai/var/data + ports: + - "8001:8001" + environment: + - ADMINMAIL=admin@kimai.local + - ADMINPASS=changemeplease + - "DATABASE_URL=mysql://kimaiuser:kimaipassword@sqldb/kimai?charset=utf8mb4&serverVersion=5.7.40" + - TRUSTED_HOSTS=nginx,localhost,127.0.0.1 + restart: unless-stopped + + kimai-kiosk-frontend: build: context: . dockerfile: Dockerfile @@ -11,3 +41,7 @@ services: interval: 30s timeout: 10s retries: 3 +volumes: + data: + mysql: +