mirror of
https://github.com/michivonah/docker.git
synced 2026-02-05 23:16:30 +01:00
add kimai
This commit is contained in:
parent
b17068efec
commit
4f1525fbaf
2 changed files with 62 additions and 0 deletions
53
kimai/docker-compose-traefik.yml
Normal file
53
kimai/docker-compose-traefik.yml
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
# Note: Kimai doesn't support passwords longer then 60 digits.
|
||||||
|
|
||||||
|
services:
|
||||||
|
kimai-db:
|
||||||
|
image: mysql:8.3
|
||||||
|
volumes:
|
||||||
|
- ./db:/var/lib/mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=${DATABASE_NAME}
|
||||||
|
- MYSQL_USER=${DATABASE_USER}
|
||||||
|
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
|
||||||
|
- MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
|
||||||
|
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
|
||||||
|
networks:
|
||||||
|
- kimai
|
||||||
|
|
||||||
|
kimai-app:
|
||||||
|
image: kimai/kimai2:apache
|
||||||
|
volumes:
|
||||||
|
- ./data:/opt/kimai/var/data
|
||||||
|
- ./plugins:/opt/kimai/var/plugins
|
||||||
|
#ports:
|
||||||
|
# - 8001:8001
|
||||||
|
environment:
|
||||||
|
- ADMINMAIL=${ADMIN_EMAIL}
|
||||||
|
- ADMINPASS=${ADMIN_PASSWORD}
|
||||||
|
- "DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@kimai-db/${DATABASE_NAME}?charset=utf8mb4&serverVersion=8.3.0"
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.kimai.entrypoints=web, websecure"
|
||||||
|
- "traefik.http.routers.kimai.rule=Host(`${TRAEFIK_DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.kimai.tls=true"
|
||||||
|
- "traefik.http.routers.kimai.tls.certresolver=cloudflare"
|
||||||
|
- "traefik.docker.network=traefik_default"
|
||||||
|
- "traefik.http.services.kimai.loadbalancer.server.port=8001"
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
- kimai
|
||||||
|
|
||||||
|
networks:
|
||||||
|
kimai:
|
||||||
|
external: false
|
||||||
|
traefik:
|
||||||
|
name: traefik_default
|
||||||
|
external: true
|
||||||
9
kimai/example.env
Normal file
9
kimai/example.env
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
DATABASE_NAME=kimai
|
||||||
|
DATABASE_USER=kimai
|
||||||
|
DATABASE_PASSWORD=replace-with-secure-string
|
||||||
|
DATABASE_ROOT_PASSWORD=replace-with-secure-string
|
||||||
|
ADMIN_EMAIL=admin@example.com
|
||||||
|
ADMIN_PASSWORD=replace-with-secure-string
|
||||||
|
TRAEFIK_DOMAIN=kimai.example.com
|
||||||
|
|
||||||
|
# Note: Kimai doesn't support passwords longer then 60 digits.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue