Use apache image for kimai for easier updating.
This commit is contained in:
@@ -6,14 +6,16 @@ networks:
|
|||||||
external: false
|
external: false
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
kimai:
|
|
||||||
name: kimai
|
|
||||||
kimai-db:
|
kimai-db:
|
||||||
name: kimai-db
|
name: kimai-db
|
||||||
|
kimai-data:
|
||||||
|
name: kimai-data
|
||||||
|
kimai-plugins:
|
||||||
|
name: kimai-plugins
|
||||||
|
|
||||||
services:
|
services:
|
||||||
kimai:
|
kimai:
|
||||||
image: kimai/kimai2:fpm
|
image: kimai/kimai2:apache
|
||||||
container_name: kimai
|
container_name: kimai
|
||||||
hostname: kimai
|
hostname: kimai
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -26,28 +28,16 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- kimai-db
|
- kimai-db
|
||||||
networks:
|
networks:
|
||||||
|
- proxy
|
||||||
- kimai
|
- kimai
|
||||||
volumes:
|
volumes:
|
||||||
- kimai:/opt/kimai/public
|
- kimai-data:/opt/kimai/var/data
|
||||||
|
- kimai-plugins:/opt/kimai/var/plugins
|
||||||
kimai-web:
|
|
||||||
image: nginx:alpine
|
|
||||||
container_name: kimai-web
|
|
||||||
hostname: kimai-web
|
|
||||||
restart: unless-stopped
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.kimai.entrypoints=web"
|
- "traefik.http.routers.kimai.entrypoints=web"
|
||||||
- "traefik.http.routers.kimai.rule=Host(`kimai.lan`)"
|
- "traefik.http.routers.kimai.rule=Host(`kimai.lan`)"
|
||||||
- "traefik.http.services.kimai.loadbalancer.server.port=80"
|
- "traefik.http.services.kimai.loadbalancer.server.port=8001"
|
||||||
depends_on:
|
|
||||||
- kimai
|
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
- kimai
|
|
||||||
volumes:
|
|
||||||
- kimai:/opt/kimai/public:ro
|
|
||||||
- ${PWD}/kimai.conf:/etc/nginx/conf.d/default.conf
|
|
||||||
|
|
||||||
kimai-db:
|
kimai-db:
|
||||||
image: mysql:8
|
image: mysql:8
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
index index.php;
|
|
||||||
server_name kimai.lan;
|
|
||||||
root /opt/kimai/public;
|
|
||||||
|
|
||||||
# cache static asset files
|
|
||||||
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
|
|
||||||
expires max;
|
|
||||||
log_not_found off;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ ^/index\.php(/|$) {
|
|
||||||
fastcgi_pass kimai:9000;
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
||||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
|
||||||
internal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user