84 lines
2.8 KiB
YAML
84 lines
2.8 KiB
YAML
---
|
|
services:
|
|
phpipam:
|
|
image: phpipam/phpipam-www:${PI_VERSION}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mariadb
|
|
environment:
|
|
- TZ=${PI_TIMEZONE}
|
|
- IPAM_DATABASE_HOST=${MARIADB_HOST}
|
|
- IPAM_DATABASE_NAME=${MARIADB_DATABASE}
|
|
- IPAM_DATABASE_USER=${MARIADB_USER}
|
|
- IPAM_DATABASE_PASS=${MARIADB_PASSWORD}
|
|
- IPAM_TRUST_X_FORWARDED=true
|
|
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=${PI_DIUN_ENABLE}
|
|
- diun.watch_repo=${PI_DIUN_WATCHREPO}
|
|
- diun.sort_tags=${PI_DIUN_SORTALGO}
|
|
- diun.include_tags=${PI_DIUN_INCLUDE}
|
|
- diun.exclude_tags=${PI_DIUN_EXCLUDE}
|
|
networks:
|
|
- traefik
|
|
- internal
|
|
|
|
cron:
|
|
image: phpipam/phpipam-cron:${PI_VERSION}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mariadb
|
|
environment:
|
|
- TZ=${PI_TIMEZONE}
|
|
- IPAM_DATABASE_HOST=mariadb
|
|
- IPAM_DATABASE_NAME=${MARIADB_DATABASE}
|
|
- IPAM_DATABASE_USER=${MARIADB_USER}
|
|
- IPAM_DATABASE_PASS=${MARIADB_PASSWORD}
|
|
- SCAN_INTERVAL=${PI_SCAN_INTERVAL}
|
|
networks:
|
|
- internal
|
|
|
|
mariadb:
|
|
image: mariadb:${MARIADB_VERSION}
|
|
restart: unless-stopped
|
|
environment:
|
|
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
|
- MARIADB_USER=${MARIADB_USER}
|
|
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
|
|
- MARIADB_DATABASE=${MARIADB_DATABASE}
|
|
labels:
|
|
### Section Diun
|
|
- diun.enable=${MARIADB_DIUN_ENABLE}
|
|
- diun.watch_repo=${MARIADB_DIUN_WATCHREPO}
|
|
- diun.sort_tags=${MARIADB_DIUN_SORTALGO}
|
|
- diun.include_tags=${MARIADB_DIUN_INCLUDE}
|
|
- diun.exclude_tags=${MARIADB_DIUN_EXCLUDE}
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ${MARIADB_DATA}:/var/lib/mysql
|
|
|
|
networks:
|
|
internal:
|
|
traefik:
|
|
external: true
|
|
name: ${TRAEFIK_NETWORK}
|