Update docker-compose.yaml
added traefik labels and networks. Updated url to access
This commit is contained in:
+22
-1
@@ -2,6 +2,8 @@ services:
|
|||||||
|
|
||||||
sqldb:
|
sqldb:
|
||||||
image: mysql:8.3
|
image: mysql:8.3
|
||||||
|
networks:
|
||||||
|
- kimai
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/docker/kimai/mysql:/var/lib/mysql
|
- /srv/docker/kimai/mysql:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
@@ -20,6 +22,19 @@ services:
|
|||||||
|
|
||||||
kimai:
|
kimai:
|
||||||
image: kimai/kimai2:stable
|
image: kimai/kimai2:stable
|
||||||
|
networks:
|
||||||
|
- traefik-public
|
||||||
|
- kimai
|
||||||
|
labels:
|
||||||
|
- "traefik.docker.network=traefik-public"
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.kimai.rule=Host(`time.speerfam.net`)"
|
||||||
|
- "traefik.http.routers.kimai.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.kimai.tls.certresolver=myresolver"
|
||||||
|
|
||||||
|
# Pulling the security rules dynamically from our file provider setup
|
||||||
|
- "traefik.http.routers.kimai.middlewares=geoblock-policy@file,crowdsec-policy@file,secure-headers@file"
|
||||||
|
- "traefik.http.services.kimai.loadbalancer.server.port=8001"
|
||||||
depends_on:
|
depends_on:
|
||||||
sqldb:
|
sqldb:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -31,7 +46,7 @@ services:
|
|||||||
- 8002:8001
|
- 8002:8001
|
||||||
environment:
|
environment:
|
||||||
- APP_SECRET= MOpjyc5UWVYowgjWR7FhStVc5NCz2D7H
|
- APP_SECRET= MOpjyc5UWVYowgjWR7FhStVc5NCz2D7H
|
||||||
- TRUSTED_HOSTS=kimai.speerfam.net # set this to the domain name you use to access Kimai
|
- TRUSTED_HOSTS=time.speerfam.net # set this to the domain name you use to access Kimai
|
||||||
- ADMINMAIL=mwspeer@gmail.com
|
- ADMINMAIL=mwspeer@gmail.com
|
||||||
- ADMINPASS=Grumbling-Evacuate-Brethren5
|
- ADMINPASS=Grumbling-Evacuate-Brethren5
|
||||||
- "DATABASE_URL=mysql://kimaiuser:Tremor-Tarot-Badland2@sqldb/kimai?charset=utf8mb4&serverVersion=8.3.0"
|
- "DATABASE_URL=mysql://kimaiuser:Tremor-Tarot-Badland2@sqldb/kimai?charset=utf8mb4&serverVersion=8.3.0"
|
||||||
@@ -41,3 +56,9 @@ volumes:
|
|||||||
data:
|
data:
|
||||||
mysql:
|
mysql:
|
||||||
plugins:
|
plugins:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik-public:
|
||||||
|
external: true
|
||||||
|
kimai:
|
||||||
|
external: false
|
||||||
Reference in New Issue
Block a user