Compare commits

...

5 Commits

Author SHA1 Message Date
9116fc9ff8 add : librenms-officiel 2024-09-22 12:43:54 +02:00
c717687b12 dsq 2024-09-22 08:56:28 +02:00
19efda5d04 update docuseal 2024-09-22 08:55:25 +02:00
2565743a2c Merge branch 'main' of git.tips-of-mine.fr:Tips-Of-Mine/Docker 2024-09-22 08:54:01 +02:00
ba5a62b3de add docuseal 2024-09-22 08:53:59 +02:00
8 changed files with 432 additions and 1 deletions

View File

@ -0,0 +1,34 @@
TZ=Europe/Paris
PUID=1000
PGID=1000
MYSQL_DATABASE=librenms
MYSQL_USER=librenms
MYSQL_PASSWORD=asupersecretpassword
MEMORY_LIMIT=256M
MAX_INPUT_VARS=1000
UPLOAD_MAX_SIZE=16M
OPCACHE_MEM_SIZE=128
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=http_x_forwarded_for
CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=redis
LIBRENMS_SNMP_COMMUNITY=librenmsdocker
LIBRENMS_WEATHERMAP=false
LIBRENMS_WEATHERMAP_SCHEDULE=*/5 * * * *
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_TLS=on
SMTP_STARTTLS=on
SMTP_TLS_CHECKCERT=on
SMTP_AUTH=on
SMTP_USER=foo
SMTP_PASSWORD=bar
SMTP_FROM=foo@gmail.com

View File

@ -0,0 +1,268 @@
name: librenms
#### NETWORKS
networks:
docker-traefik_front_network:
external: true
back_network:
driver: bridge
attachable: true
#### SERVICES
services:
# traefik:
# image: traefik:2.5
# container_name: traefik
# command:
# - "--global.checknewversion=false"
# - "--global.sendanonymoususage=false"
# - "--log=true"
# - "--log.level=INFO"
# - "--entrypoints.http=true"
# - "--entrypoints.http.address=:80"
# - "--entrypoints.http.http.redirections.entrypoint.to=https"
# - "--entrypoints.http.http.redirections.entrypoint.scheme=https"
# - "--entrypoints.https=true"
# - "--entrypoints.https.address=:443"
# - "--certificatesresolvers.letsencrypt"
# - "--certificatesresolvers.letsencrypt.acme.storage=acme.json"
# - "--certificatesresolvers.letsencrypt.acme.email=webmaster@example.com"
# - "--certificatesresolvers.letsencrypt.acme.httpchallenge"
# - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http"
# - "--providers.docker"
# - "--providers.docker.watch=true"
# - "--providers.docker.exposedbydefault=false"
# ports:
# - target: 80
# published: 80
# protocol: tcp
# - target: 443
# published: 443
# protocol: tcp
# volumes:
# - "./acme.json:/acme.json"
# - "/var/run/docker.sock:/var/run/docker.sock"
# restart: always
## mariadb
mariadb:
container_name: librenms-mariadb
hostname: librenms-mariadb
image: mariadb:10
command:
- "mysqld"
- "--innodb-file-per-table=1"
- "--lower-case-table-names=0"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
volumes:
- "./mariadb:/var/lib/mysql"
networks:
- back_network
environment:
- "TZ=${TZ}"
- "MARIADB_RANDOM_ROOT_PASSWORD=yes"
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
- "MYSQL_USER=${MYSQL_USER}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
restart: always
healthcheck:
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
start_period: 1m
start_interval: 10s
interval: 1m
timeout: 5s
retries: 3
## redis
redis:
container_name: librenms-redis
hostname: librenms-redis
image: redis:7.2-alpine
networks:
- back_network
environment:
- "TZ=${TZ}"
restart: always
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 10s
timeout: 5s
retries: 3
## msmtpd
msmtpd:
container_name: librenms-msmtpd
hostname: librenms-msmtpd
image: crazymax/msmtpd:latest
networks:
- back_network
environment:
- "TZ=Europe/Paris"
- "PUID=1500"
- "PGID=1500"
- "SMTP_HOST=10.0.4.52"
- "SMTP_PORT=587"
- "SMTP_TLS=on"
- "SMTP_STARTTLS=on"
- "SMTP_TLS_CHECKCERT=off"
- "SMTP_AUTH=on"
- "SMTP_USER=hostinfo@tips-of-mine.fr"
- "SMTP_PASSWORD=Whf2VtLEd2QR4er"
- "SMTP_DOMAIN=localhost"
- "SMTP_FROM=hostinfo@tips-of-mine.fr"
restart: always
healthcheck:
test: ["CMD-SHELL", "echo EHLO localhost"]
interval: 5s
timeout: 5s
retries: 5
## librenms
librenms:
container_name: librenms-app
hostname: librenms-app
image: librenms/librenms:latest
depends_on:
- mariadb:
condition: service_healthy
restart: true
- redis:
condition: service_healthy
restart: true
- msmtpd:
condition: service_healthy
restart: true
volumes:
- "./librenms:/data"
networks:
- docker-traefik_front_network
- back_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=interne"
# HTTP
- "traefik.http.routers.librenms-http.rule=Host(`librenms.traefik.me`)"
- "traefik.http.routers.librenms-http.entrypoints=http"
# HTTPS
- "traefik.http.routers.librenms-https.rule=Host(`librenms.traefik.me`)"
- "traefik.http.routers.librenms-https.entrypoints=https"
- "traefik.http.routers.librenms-https.service=librenms-service"
- "traefik.http.routers.librenms-https.tls=true"
# - "traefik.http.routers.librenms-https.tls.certresolver=letsencrypt"
# - "traefik.http.routers.librenms-https.tls.domains[0].main=librenms.example.com"
# Middleware
# Service
- "traefik.http.services.librenms-service.loadbalancer.server.port=8000"
# env_file:
# - "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=mariadb"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
restart: always
## dispatcher
dispatcher:
container_name: librenms-dispatcher
hostname: librenms-dispatcher
image: librenms/librenms:latest
depends_on:
- librenms
- redis:
condition: service_healthy
restart: true
volumes:
- "./librenms:/data"
networks:
- back_network
# env_file:
# - "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=mariadb"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "DISPATCHER_NODE_ID=dispatcher1"
- "SIDECAR_DISPATCHER=1"
restart: always
## syslogng
syslogng:
container_name: librenms-syslog
hostname: librenms-syslogng
image: librenms/librenms:latest
depends_on:
- librenms
- redis:
condition: service_healthy
restart: true
ports:
- target: 514
published: 514
protocol: tcp
- target: 514
published: 514
protocol: udp
volumes:
- "./librenms:/data"
networks:
- back_network
# env_file:
# - "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=mariadb"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SYSLOGNG=1"
restart: always
## snmptrapd
snmptrapd:
container_name: librenms-snmptrapd
hostname: librenms-snmptrapd
image: librenms/librenms:latest
depends_on:
- librenms
- redis:
condition: service_healthy
restart: true
ports:
- target: 162
published: 162
protocol: tcp
- target: 162
published: 162
protocol: udp
volumes:
- "./librenms:/data"
networks:
- back_network
# env_file:
# - "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=mariadb"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SNMPTRAPD=1"
restart: always

View File

@ -0,0 +1,16 @@
MEMORY_LIMIT=256M
MAX_INPUT_VARS=1000
UPLOAD_MAX_SIZE=16M
OPCACHE_MEM_SIZE=128
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=http_x_forwarded_for
CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=redis
LIBRENMS_SNMP_COMMUNITY=librenmsdocker
LIBRENMS_WEATHERMAP=false
LIBRENMS_WEATHERMAP_SCHEDULE=*/5 * * * *

View File

@ -0,0 +1,10 @@
# https://github.com/crazy-max/docker-msmtpd
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_TLS=on
SMTP_STARTTLS=on
SMTP_TLS_CHECKCERT=on
SMTP_AUTH=on
SMTP_USER=foo
SMTP_PASSWORD=bar
SMTP_FROM=foo@gmail.com

3
Outils/docuseal/LICENSE Normal file
View File

@ -0,0 +1,3 @@
Additional permission under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.

View File

@ -0,0 +1,96 @@
#### NETWORKS
networks:
docker-traefik_front_network:
external: true
back_network:
driver: bridge
attachable: true
#### SERVICES
services:
docuseal:
container_name: docuseal-app
hostname: docuseal-app
image: docuseal/docuseal:latest
# ports:
# - 3900:3000
volumes:
- ./docuseal:/data/docuseal
environment:
- FORCE_SSL=https://docuseal.fr.dgs.group
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
depends_on:
postgres:
condition: service_healthy
msmtpd:
networks:
- docker-traefik_front_network
- back_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=interne"
# HTTP
- "traefik.http.routers.docuseal-http.rule=Host(`docuseal.fr.dgs.group`)"
- "traefik.http.routers.docuseal-http.entrypoints=http"
# HTTPS
- "traefik.http.routers.docuseal-https.rule=Host(`docuseal.fr.dgs.group`)"
- "traefik.http.routers.docuseal-https.entrypoints=https"
- "traefik.http.routers.docuseal-https.service=docuseal-service"
- "traefik.http.routers.docuseal-https.tls=true"
# Middleware
# Service
- "traefik.http.services.docuseal-service.loadbalancer.server.port=3000"
postgres:
container_name: docuseal-postgres
hostname: docuseal-postgres
environment:
PGDATA: /var/lib/postgresql/data/docuseal
POSTGRES_DB: docuseal
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
image: postgres:15.6-alpine
networks:
- back_network
restart: always
volumes:
- ./data:/var/lib/postgresql/data:rw
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
msmtpd:
container_name: docuseal-msmtpd
hostname: docuseal-msmtpd
image: crazymax/msmtpd:latest
# ports:
# - 2500:2500
environment:
- "TZ=Europe/Paris"
- "PUID=1500"
- "PGID=1500"
- "SMTP_HOST=smtp.gmail.com"
- "SMTP_PORT=587"
- "SMTP_TLS=on"
- "SMTP_STARTTLS=on"
- "SMTP_TLS_CHECKCERT=off"
- "SMTP_AUTH=on"
- "SMTP_USER=hostinfo@tips-of-mine.fr"
- "SMTP_PASSWORD=P@sww0rd!12345"
# - "SMTP_USER_FILE=/run/secrets/smtp_user"
# - "SMTP_PASSWORD_FILE=/run/secrets/smtp_password"
- "SMTP_DOMAIN=localhost"
- "SMTP_FROM=hostinfo@tips-of-mine.fr"
# secrets:
# - smtp_user
# - smtp_password
volumes:
restart: always
# secrets:
# smtp_user:
# external: true
# smtp_password:
# external: true

View File

@ -33,6 +33,9 @@ runner:
# ubuntu:22.04 here is not enough.
labels:
- "ubuntu-22.04:docker://node:16-bullseye"
- "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
- "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
- "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
cache:
# Enable cache server to use actions/cache.

View File

@ -5,6 +5,7 @@ networks:
back_network:
driver: bridge
attachable: true
external: false
#### SERVICES
services:
@ -69,7 +70,7 @@ services:
- /etc/localtime:/etc/localtime:ro
ports:
- "3080:3000"
- "3222:22"
- "222:22"
depends_on:
postgres:
condition: service_healthy