122 lines
4.2 KiB
YAML
122 lines
4.2 KiB
YAML
---
|
|
services:
|
|
snipeit:
|
|
image: snipe/snipe-it:${SNIPEIT_VERSION}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mariadb
|
|
- redis
|
|
environment:
|
|
- APP_ENV=${SNIPEIT_ENV}
|
|
- APP_DEBUG=${SNIPEIT_DEBUG}
|
|
- APP_KEY=${SNIPEIT_KEY}
|
|
- APP_URL=${SNIPEIT_URL}
|
|
- APP_TIMEZONE=${SNIPEIT_TIMEZONE}
|
|
- APP_LOCALE=${SNIPEIT_LOCALE}
|
|
- MAX_RESULTS=${SNIPEIT_MAXRESULTS}
|
|
- PRIVATE_FILESYSTEM_DISK=${SNIPEIT_PRIVATE_FS}
|
|
- PUBLIC_FILESYSTEM_DISK=${SNIPEIT_PUBLIC_FS}
|
|
- DB_CONNECTION=mysql
|
|
- DB_HOST=mariadb
|
|
- DB_DATABASE=${MARIADB_NAME}
|
|
- DB_USERNAME=${MARIADB_USER}
|
|
- DB_PASSWORD=${MARIADB_PASS}
|
|
- DB_PREFIX=${MARIADB_PREFIX}
|
|
- DB_DUMP_PATH=
|
|
- DB_CHARSET=utf8mb4
|
|
- DB_COLLATION=utf8mb4_unicode_ci
|
|
- MAIL_DRIVER=smtp
|
|
- MAIL_HOST=${SNIPEIT_MAIL_HOST}
|
|
- MAIL_PORT=${SNIPEIT_MAIL_PORT}
|
|
- MAIL_USERNAME=${SNIPEIT_MAIL_USER}
|
|
- MAIL_PASSWORD=${SNIPEIT_MAIL_PASS}
|
|
- MAIL_ENCRYPTION=${SNIPEIT_MAIL_ENCR}
|
|
- MAIL_FROM_ADDR=${SNIPEIT_MAIL_FADDR}
|
|
- MAIL_FROM_NAME=${SNIPEIT_MAIL_FNAME}
|
|
- MAIL_REPLYTO_ADDR=${SNIPEIT_MAIL_RADDR}
|
|
- MAIL_REPLYTO_NAME=${SNIPEIT_MAIL_RNAME}
|
|
- MAIL_AUTO_EMBED=true
|
|
- MAIL_AUTO_EMBED_METHOD=${SNIPEIT_MAIL_EMBED}
|
|
- IMAGE_LIB=gd
|
|
- APP_TRUSTED_PROXIES=${SNIPEIT_PROXY}
|
|
- SECURE_COOKIES=true
|
|
- REDIS_HOST=redis
|
|
- REDIS_PASSWORD=${REDIS_PASS}
|
|
- REDIS_PORT=6379
|
|
- LOGIN_MAX_ATTEMPTS=${SNIPEIT_LOGINATT}
|
|
- LOGIN_LOCKOUT_DURATION=${SNIPEIT_LOCKDUR}
|
|
- RESET_PASSWORD_LINK_EXPIRES=${SNIPEIT_PWLINKEXP}
|
|
labels:
|
|
### Section Træfik
|
|
- traefik.enable=${TRAEFIK_ENABLED}
|
|
- traefik.docker.network=${TRAEFIK_NETWORK}
|
|
## HTTP
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
|
|
# redirect to HTTPS only
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTP_MIDDLEWARES}
|
|
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
|
## HTTPS
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
|
|
# configure the exposed service
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTPS_MIDDLEWARES}
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
|
|
# enable TLS and its certificate provider
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
|
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
|
|
# specify a service so a custom port can be used
|
|
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
|
|
### Section Diun
|
|
- diun.enable=${DIUN_SNIPEIT_ENABLE}
|
|
- diun.watch_repo=${DIUN_SNIPEIT_WATCHREPO}
|
|
- diun.sort_tags=${DIUN_SNIPEIT_SORTALGO}
|
|
- diun.include_tags=${DIUN_SNIPEIT_INCLUDE}
|
|
- diun.exclude_tags=${DIUN_SNIPEIT_EXCLUDE}
|
|
networks:
|
|
- internal
|
|
- traefik
|
|
volumes:
|
|
- ${SNIPEIT_DATA}/data:/var/lib/snipeit
|
|
- ${SNIPEIT_DATA}/logs:/var/www/html/storage/logs
|
|
|
|
mariadb:
|
|
image: mariadb:${MARIADB_VERSION}
|
|
restart: unless-stopped
|
|
environment:
|
|
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT}
|
|
- MARIADB_DATABASE=${MARIADB_NAME}
|
|
- MARIADB_USER=${MARIADB_USER}
|
|
- MARIADB_PASSWORD=${MARIADB_PASS}
|
|
labels:
|
|
### Section Diun
|
|
- diun.enable=${DIUN_MARIADB_ENABLE}
|
|
- diun.watch_repo=${DIUN_MARIADB_WATCHREPO}
|
|
- diun.sort_tags=${DIUN_MARIADB_SORTALGO}
|
|
- diun.include_tags=${DIUN_MARIADB_INCLUDE}
|
|
- diun.exclude_tags=${DIUN_MARIADB_EXCLUDE}
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ${MARIADB_DATA}:/var/lib/mysql
|
|
|
|
redis:
|
|
image: redis:${REDIS_VERSION}
|
|
restart: unless-stopped
|
|
command: --requirepass ${REDIS_PASS}
|
|
environment:
|
|
- REDIS_PASS=${REDIS_PASS}
|
|
labels:
|
|
### Section Diun
|
|
- diun.enable=${DIUN_REDIS_ENABLE}
|
|
- diun.watch_repo=${DIUN_REDIS_WATCHREPO}
|
|
- diun.sort_tags=${DIUN_REDIS_SORTALGO}
|
|
- diun.include_tags=${DIUN_REDIS_INCLUDE}
|
|
- diun.exclude_tags=${DIUN_REDIS_EXCLUDE}
|
|
networks:
|
|
- internal
|
|
|
|
networks:
|
|
internal:
|
|
traefik:
|
|
external: true
|
|
name: ${TRAEFIK_NETWORK}
|