89 lines
2.5 KiB
YAML
89 lines
2.5 KiB
YAML
services:
|
|
web: &glpi_base
|
|
container_name: glpi-web
|
|
build: web-builder
|
|
restart: always
|
|
networks:
|
|
- proxy
|
|
- default
|
|
volumes:
|
|
- ./etc/:/etc/glpi/
|
|
- ./files/:/var/lib/glpi/
|
|
- ./log/:/var/log/glpi/
|
|
- /etc/localtime:/etc/localtime:ro
|
|
env_file:
|
|
- ./mysql_settings.ini
|
|
environment:
|
|
- PHP_MEMORY_LIMIT=256M
|
|
- PHP_UPLOAD_MAX_FILESIZE=20M
|
|
- PHP_POST_MAX_SIZE=40M
|
|
- PHP_SESSION_GC_MAXLIFETIME=14400
|
|
- PHP_DATE_TIMEZONE=Europe/Paris
|
|
- PHP_MAX_INPUT_VARS=100000
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.middlewares.tohttps.redirectscheme.scheme=https"
|
|
- "traefik.http.middlewares.tohttps.redirectscheme.permanent=true"
|
|
- "traefik.http.middlewares.tohttps.redirectscheme.port=443"
|
|
- "traefik.http.routers.glpi-http.rule=Host(`glpi.blorand.org`)"
|
|
- "traefik.http.routers.glpi-http.entrypoints=web"
|
|
- "traefik.http.routers.glpi-http.middlewares=tohttps"
|
|
- "traefik.http.routers.glpi-https.rule=Host(`glpi.blorand.org`)&&!PathPrefix(`/front/inventory.php`)"
|
|
- "traefik.http.routers.glpi-https.entrypoints=websecure"
|
|
- "traefik.http.routers.glpi-https.tls=true"
|
|
- "traefik.http.routers.glpi-inventory-https.rule=Host(`glpi.blorand.org`)&&PathPrefix(`/front/inventory.php`)"
|
|
- "traefik.http.routers.glpi-inventory-https.entrypoints=websecure"
|
|
- "traefik.http.routers.glpi-inventory-https.tls=true"
|
|
- "traefik.http.routers.glpi-inventory-https.middlewares=glpi-inventory-auth"
|
|
|
|
cron:
|
|
<<: *glpi_base
|
|
container_name: glpi-cron
|
|
networks:
|
|
- default
|
|
volumes:
|
|
- ./etc/:/etc/glpi/
|
|
- ./files/:/var/lib/glpi/
|
|
- ./log/:/var/log/glpi/
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports: []
|
|
entrypoint: /etc/service/cron
|
|
depends_on:
|
|
- db
|
|
- web
|
|
labels: []
|
|
|
|
db:
|
|
image: mariadb:lts
|
|
container_name: glpi-db
|
|
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
|
restart: always
|
|
networks:
|
|
- default
|
|
env_file:
|
|
- ./mysql_settings.ini
|
|
volumes:
|
|
- ./db/:/var/lib/mysql/
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
redis:
|
|
container_name: glpi-redis
|
|
image: redis:alpine
|
|
volumes:
|
|
- ./cache:/data
|
|
restart: "always"
|
|
networks:
|
|
- default
|
|
|
|
networks:
|
|
default:
|
|
ipam:
|
|
config:
|
|
- subnet: 172.18.4.0/24
|
|
proxy:
|
|
name: proxy
|
|
external: true
|