svg
|
@ -1,33 +1,45 @@
|
||||||
.env.local
|
**/.env.local
|
||||||
/env/*.local
|
**/.env.merge
|
||||||
/tmp
|
|
||||||
|
|
||||||
/volume/mariadb/mysql
|
/services/15-mariadb/volume/mysql
|
||||||
|
|
||||||
|
/services/30-minio/volume/data
|
||||||
|
|
||||||
|
/services/30-openldap/volume/data
|
||||||
|
|
||||||
|
/services/50-ninegate/env/*.local
|
||||||
|
/services/50-ninegate/env/*.merge
|
||||||
|
/services/50-ninegate/volume/data/private/*
|
||||||
|
!/services/50-ninegate/volume/data/private/.gitkeep
|
||||||
|
/services/50-ninegate/volume/data/public/*
|
||||||
|
!/services/50-ninegate/volume/data/public/avatar
|
||||||
|
/services/50-ninegate/volume/data/public/avatar/*
|
||||||
|
!/services/50-ninegate/volume/data/public/avatar/admin.jpg
|
||||||
|
!/services/50-ninegate/volume/data/public/avatar/noavatar.png
|
||||||
|
!/services/50-ninegate/volume/data/public/avatar/system.jpg
|
||||||
|
!/services/50-ninegate/volume/data/public/logo
|
||||||
|
/services/50-ninegate/volume/data/public/logo/*
|
||||||
|
!/services/50-ninegate/volume/data/public/logo/logo.png
|
||||||
|
!/services/50-ninegate/volume/data/public/header
|
||||||
|
/services/50-ninegate/volume/data/public/header/*
|
||||||
|
!/services/50-ninegate/volume/data/public/header/header.png
|
||||||
|
!/services/50-ninegate/volume/data/public/icon
|
||||||
|
/services/50-ninegate/volume/data/public/icon/*
|
||||||
|
!/services/50-ninegate/volume/data/public/icon/icon_*.png
|
||||||
|
|
||||||
|
|
||||||
|
/services/50-nineskeletor/volume/data/private/*
|
||||||
|
!/services/50-nineskeletor/volume/data/private/.gitkeep
|
||||||
|
/services/50-nineskeletor/volume/data/public/*
|
||||||
|
!/services/50-nineskeletor/volume/data/public/.gitkeep
|
||||||
|
|
||||||
|
/services/50-wordpress/volume/data
|
||||||
|
|
||||||
/volume/minio/data
|
|
||||||
|
|
||||||
/volume/nextcloud/data
|
/volume/nextcloud/data
|
||||||
/volume/nextcloud/html
|
/volume/nextcloud/html
|
||||||
/volume/nextcloud/app
|
/volume/nextcloud/app
|
||||||
|
|
||||||
/volume/ninegate/data/private/*
|
|
||||||
!/volume/ninegate/data/private/.gitkeep
|
|
||||||
/volume/ninegate/data/public/*
|
|
||||||
!/volume/ninegate/data/public/avatar
|
|
||||||
/volume/ninegate/data/public/avatar/*
|
|
||||||
!/volume/ninegate/data/public/avatar/admin.jpg
|
|
||||||
!/volume/ninegate/data/public/avatar/noavatar.png
|
|
||||||
!/volume/ninegate/data/public/avatar/system.jpg
|
|
||||||
!/volume/ninegate/data/public/logo
|
|
||||||
/volume/ninegate/data/public/logo/*
|
|
||||||
!/volume/ninegate/data/public/logo/logo.png
|
|
||||||
!/volume/ninegate/data/public/header
|
|
||||||
/volume/ninegate/data/public/header/*
|
|
||||||
!/volume/ninegate/data/public/header/header.png
|
|
||||||
!/volume/ninegate/data/public/icon
|
|
||||||
/volume/ninegate/data/public/icon/*
|
|
||||||
!/volume/ninegate/data/public/icon/icon_*.png
|
|
||||||
|
|
||||||
/volume/nineboard/data/private/*
|
/volume/nineboard/data/private/*
|
||||||
!/volume/nineboard/data/private/.gitkeep
|
!/volume/nineboard/data/private/.gitkeep
|
||||||
/volume/nineboard/data/public/*
|
/volume/nineboard/data/public/*
|
||||||
|
@ -40,6 +52,3 @@
|
||||||
/volume/nineboard/data/public/logo/*
|
/volume/nineboard/data/public/logo/*
|
||||||
!/volume/nineboard/data/public/logo/logo.png
|
!/volume/nineboard/data/public/logo/logo.png
|
||||||
|
|
||||||
/volume/openldap/data
|
|
||||||
|
|
||||||
/volume/wordpress/data
|
|
||||||
|
|
|
@ -0,0 +1,248 @@
|
||||||
|
services:
|
||||||
|
|
||||||
|
#== SERVICES OUTILS =======================================================================================================================
|
||||||
|
|
||||||
|
# Nineapache
|
||||||
|
# Reverse proxy de l'ensemble des services
|
||||||
|
# Seul port ouvert sur l'exterieur
|
||||||
|
nineapache:
|
||||||
|
image: reg.cadoles.com/envole/nineapache:8.1
|
||||||
|
container_name: nine-nineapache
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.nineapache
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./volume/nineapache/nine/apache.conf:/etc/apache2/conf.d/zapp.conf
|
||||||
|
|
||||||
|
# Mariadb
|
||||||
|
# Base de données des services
|
||||||
|
# Port interne 3306
|
||||||
|
mariadb:
|
||||||
|
image: docker.io/library/mariadb
|
||||||
|
container_name: nine-mariadb
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: /nine/check.sh
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.mariadb
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./volume/mariadb/mysql:/var/lib/mysql
|
||||||
|
- ./volume/mariadb/nine:/nine
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
# Base de données redis pour les services qui souhaitent stocker leur session en bdd
|
||||||
|
# Port interne 6379
|
||||||
|
redis:
|
||||||
|
image: redis:4.0
|
||||||
|
container_name: nine-redis
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Paris
|
||||||
|
|
||||||
|
# Minio
|
||||||
|
# Stocakge S3
|
||||||
|
# Port interne 9000 pour le stockage / Port interne 9001 pour l'interface web
|
||||||
|
minio:
|
||||||
|
image: minio/minio
|
||||||
|
container_name: nine-minio
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./tmp/.env.minio
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- './volume/minio/data:/data'
|
||||||
|
command: server /data --console-address ":9001"
|
||||||
|
|
||||||
|
# Openldap
|
||||||
|
# Annuaire
|
||||||
|
# Port interne 1389 & 1636
|
||||||
|
openldap:
|
||||||
|
image: docker.io/bitnami/openldap:2
|
||||||
|
container_name: nine-openldap
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: /nine/check.sh
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.openldap
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- './volume/openldap/data:/bitnami/openldap'
|
||||||
|
- './volume/openldap/nine:/nine'
|
||||||
|
|
||||||
|
# Keycloak
|
||||||
|
# serveur SSO
|
||||||
|
# Port interne 8999 & 8443
|
||||||
|
keycloak:
|
||||||
|
image: reg.cadoles.com/envole/keycloak:24.0.5
|
||||||
|
container_name: nine-keycloak
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://127.0.0.1:9990 || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.keycloak
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- 8999:8999
|
||||||
|
- 8443:8443
|
||||||
|
volumes:
|
||||||
|
- './volume/keycloak/nine:/nine'
|
||||||
|
command:
|
||||||
|
- start-dev
|
||||||
|
- --import-realm
|
||||||
|
|
||||||
|
#== SERVICES APPLICATIF =======================================================================================================================
|
||||||
|
|
||||||
|
# Nextcloud
|
||||||
|
# Hébergement de fichiers et une plateforme de collaboration
|
||||||
|
# Port interne 80
|
||||||
|
nextcloud:
|
||||||
|
image: reg.cadoles.com/envole/nextcloud
|
||||||
|
container_name: nine-nextcloud
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.nextcloud
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./volume/nextcloud/html:/var/www/html
|
||||||
|
- ./volume/nextcloud/app:/var/www/html/custom_apps
|
||||||
|
- ./volume/nextcloud/data:/var/www/html/data
|
||||||
|
- ./volume/nextcloud/nine:/nine
|
||||||
|
- ./volume/nextcloud/prestart:/docker-entrypoint-hooks.d/before-starting
|
||||||
|
|
||||||
|
# Nineboard
|
||||||
|
# Tableaux de bord collaboratif
|
||||||
|
# Port interne 80
|
||||||
|
nineboard:
|
||||||
|
image: reg.cadoles.com/envole/nineboard
|
||||||
|
container_name: nine-nineboard
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost/nineboard || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.nineboard
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./volume/nineboard/data/private:/app/uploads
|
||||||
|
- ./volume/nineboard/data/public:/app/public/uploads
|
||||||
|
|
||||||
|
# Ninegate
|
||||||
|
# Portail collaboratif
|
||||||
|
# Port interne 80
|
||||||
|
ninegate:
|
||||||
|
image: reg.cadoles.com/envole/ninegate
|
||||||
|
container_name: nine-ninegate
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost/ninegate || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.ninegate
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./volume/ninegate/data/private:/app/uploads
|
||||||
|
- ./volume/ninegate/data/public:/app/public/uploads
|
||||||
|
|
||||||
|
# Nineskeletor
|
||||||
|
# Portail collaboratif V2
|
||||||
|
# Port interne 80
|
||||||
|
nineskeletor:
|
||||||
|
image: reg.cadoles.com/envole/nineskeletor
|
||||||
|
container_name: nine-nineskeletor
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost/nineskeletor || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.nineskeletor
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./volume/nineskeletor/data/private:/app/uploads
|
||||||
|
- ./volume/nineskeletor/data/public:/app/public/uploads
|
||||||
|
|
||||||
|
# Wiki.js
|
||||||
|
# Wiki
|
||||||
|
# Port interne 3000
|
||||||
|
wiki:
|
||||||
|
image: linuxserver/dokuwiki
|
||||||
|
container_name: nine-dokuwiki
|
||||||
|
env_file: ./tmp/.env.dokuwiki
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- 9000:80
|
||||||
|
|
||||||
|
# Wordpress
|
||||||
|
# Reseau de blog
|
||||||
|
# Port interne 80
|
||||||
|
wordpress:
|
||||||
|
image: reg.cadoles.com/envole/wordpress
|
||||||
|
container_name: nine-wordpress
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost/wordpress || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./tmp/.env.wordpress
|
||||||
|
networks:
|
||||||
|
nine-network:
|
||||||
|
aliases:
|
||||||
|
- blog
|
||||||
|
volumes:
|
||||||
|
- ./volume/wordpress/data:/app/public/wp-content
|
||||||
|
|
||||||
|
#== SERVIVES DEVELOPPEUR ==================================================================================================================
|
||||||
|
|
||||||
|
# Adminer
|
||||||
|
# Gestionnaire BDD
|
||||||
|
# Port interne 8080
|
||||||
|
adminer:
|
||||||
|
image: docker.io/library/adminer
|
||||||
|
container_name: nine-adminer
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./tmp/.env.adminer
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- 9100:8080
|
||||||
|
|
||||||
|
# Phpldapadmin
|
||||||
|
# Gestionnaire Annuaire
|
||||||
|
# Port interne 80
|
||||||
|
phpldapadmin:
|
||||||
|
image: docker.io/osixia/phpldapadmin:latest
|
||||||
|
container_name: nine-phpldapadmin
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./tmp/.env.phpldapadmin
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- "9101:80"
|
||||||
|
|
||||||
|
#== NETWORKS ==============================================================================================================================
|
||||||
|
|
||||||
|
networks:
|
||||||
|
nine-network:
|
||||||
|
name: nine-network
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
#== SERVICES OUTILS =======================================================================================================================
|
|
||||||
|
|
||||||
# Nineapache
|
# Nineapache
|
||||||
# Reverse proxy de l'ensemble des services
|
# Reverse proxy de l'ensemble des services
|
||||||
# Seul port ouvert sur l'exterieur
|
# Seul port ouvert sur l'exterieur
|
||||||
|
@ -15,13 +11,13 @@ services:
|
||||||
test: curl --fail http://localhost || exit 1
|
test: curl --fail http://localhost || exit 1
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
env_file: ./tmp/.env.nineapache
|
env_file: ./services/10-nineapache/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./volume/nineapache/nine/apache.conf:/etc/apache2/conf.d/zapp.conf
|
- ./services/10-nineapache/volume/nine/apache.conf:/etc/apache2/conf.d/zapp.conf
|
||||||
|
|
||||||
# Mariadb
|
# Mariadb
|
||||||
# Base de données des services
|
# Base de données des services
|
||||||
|
@ -34,36 +30,27 @@ services:
|
||||||
test: /nine/check.sh
|
test: /nine/check.sh
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
env_file: ./tmp/.env.mariadb
|
env_file: ./services/15-mariadb/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
volumes:
|
volumes:
|
||||||
- ./volume/mariadb/mysql:/var/lib/mysql
|
- ./services/15-mariadb/volume/mysql:/var/lib/mysql
|
||||||
- ./volume/mariadb/nine:/nine
|
- ./services/15-mariadb/volume/nine:/nine
|
||||||
|
|
||||||
# Redis
|
|
||||||
# Base de données redis pour les services qui souhaitent stocker leur session en bdd
|
|
||||||
# Port interne 6379
|
|
||||||
redis:
|
|
||||||
image: redis:4.0
|
|
||||||
container_name: nine-redis
|
|
||||||
environment:
|
|
||||||
- TZ=Europe/Paris
|
|
||||||
|
|
||||||
# Minio
|
# Minio
|
||||||
# Stocakge S3
|
# Stocakge S3
|
||||||
# Port interne 9000 pour le stockage / Port interne 9001 pour l'interface web
|
# Port interne 9000 pour le stockage / Port interne 9001 pour l'interface web
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio
|
image: bitnami/minio
|
||||||
container_name: nine-minio
|
container_name: nine-minio
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: ./tmp/.env.minio
|
env_file: ./services/30-minio/env/.env.merge
|
||||||
|
ports:
|
||||||
|
- "9001:9001"
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
volumes:
|
volumes:
|
||||||
- './volume/minio/data:/data'
|
- './services/30-minio/volume/data:/data'
|
||||||
command: server /data --console-address ":9001"
|
|
||||||
|
|
||||||
# Openldap
|
# Openldap
|
||||||
# Annuaire
|
# Annuaire
|
||||||
# Port interne 1389 & 1636
|
# Port interne 1389 & 1636
|
||||||
|
@ -75,76 +62,24 @@ services:
|
||||||
test: /nine/check.sh
|
test: /nine/check.sh
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
env_file: ./tmp/.env.openldap
|
env_file: ./services/30-openldap/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
volumes:
|
volumes:
|
||||||
- './volume/openldap/data:/bitnami/openldap'
|
- './services/30-openldap/volume/data:/bitnami/openldap'
|
||||||
- './volume/openldap/nine:/nine'
|
- './services/30-openldap/volume/nine:/nine'
|
||||||
|
|
||||||
# Keycloak
|
# Redis
|
||||||
# serveur SSO
|
# Base de données redis pour les services qui souhaitent stocker leur session en bdd
|
||||||
# Port interne 8999 & 8443
|
# Port interne 6379
|
||||||
keycloak:
|
redis:
|
||||||
image: reg.cadoles.com/envole/keycloak:24.0.5
|
image: redis:4.0
|
||||||
container_name: nine-keycloak
|
container_name: nine-redis
|
||||||
restart: unless-stopped
|
env_file: ./services/30-redis/env/.env.merge
|
||||||
healthcheck:
|
|
||||||
test: curl --fail http://127.0.0.1:9990 || exit 1
|
|
||||||
interval: 1s
|
|
||||||
timeout: 60s
|
|
||||||
env_file: ./tmp/.env.keycloak
|
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
ports:
|
environment:
|
||||||
- 8999:8999
|
- TZ=Europe/Paris
|
||||||
- 8443:8443
|
|
||||||
volumes:
|
|
||||||
- './volume/keycloak/nine:/nine'
|
|
||||||
command:
|
|
||||||
- start-dev
|
|
||||||
- --import-realm
|
|
||||||
|
|
||||||
#== SERVICES APPLICATIF =======================================================================================================================
|
|
||||||
|
|
||||||
# Nextcloud
|
|
||||||
# Hébergement de fichiers et une plateforme de collaboration
|
|
||||||
# Port interne 80
|
|
||||||
nextcloud:
|
|
||||||
image: reg.cadoles.com/envole/nextcloud
|
|
||||||
container_name: nine-nextcloud
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: curl --fail http://localhost || exit 1
|
|
||||||
interval: 1s
|
|
||||||
timeout: 60s
|
|
||||||
env_file: ./tmp/.env.nextcloud
|
|
||||||
networks:
|
|
||||||
- nine-network
|
|
||||||
volumes:
|
|
||||||
- ./volume/nextcloud/html:/var/www/html
|
|
||||||
- ./volume/nextcloud/app:/var/www/html/custom_apps
|
|
||||||
- ./volume/nextcloud/data:/var/www/html/data
|
|
||||||
- ./volume/nextcloud/nine:/nine
|
|
||||||
- ./volume/nextcloud/prestart:/docker-entrypoint-hooks.d/before-starting
|
|
||||||
|
|
||||||
# Nineboard
|
|
||||||
# Tableaux de bord collaboratif
|
|
||||||
# Port interne 80
|
|
||||||
nineboard:
|
|
||||||
image: reg.cadoles.com/envole/nineboard
|
|
||||||
container_name: nine-nineboard
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: curl --fail http://localhost/nineboard || exit 1
|
|
||||||
interval: 1s
|
|
||||||
timeout: 60s
|
|
||||||
env_file: ./tmp/.env.nineboard
|
|
||||||
networks:
|
|
||||||
- nine-network
|
|
||||||
volumes:
|
|
||||||
- ./volume/nineboard/data/private:/app/uploads
|
|
||||||
- ./volume/nineboard/data/public:/app/public/uploads
|
|
||||||
|
|
||||||
# Ninegate
|
# Ninegate
|
||||||
# Portail collaboratif
|
# Portail collaboratif
|
||||||
|
@ -152,29 +87,27 @@ services:
|
||||||
ninegate:
|
ninegate:
|
||||||
image: reg.cadoles.com/envole/ninegate
|
image: reg.cadoles.com/envole/ninegate
|
||||||
container_name: nine-ninegate
|
container_name: nine-ninegate
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
env_file: ./services/50-ninegate/env/.env.merge
|
||||||
test: curl --fail http://localhost/ninegate || exit 1
|
|
||||||
interval: 1s
|
|
||||||
timeout: 60s
|
|
||||||
env_file: ./tmp/.env.ninegate
|
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
volumes:
|
volumes:
|
||||||
- ./volume/ninegate/data/private:/app/uploads
|
- ./services/50-ninegate/volume/data/private:/app/uploads
|
||||||
- ./volume/ninegate/data/public:/app/public/uploads
|
- ./services/50-ninegate/volume/data/public:/app/public/uploads
|
||||||
|
|
||||||
# Wiki.js
|
# Nineskeletor
|
||||||
# Wiki
|
# Portail collaboratif
|
||||||
# Port interne 3000
|
# Port interne 80
|
||||||
wiki:
|
nineskeletor:
|
||||||
image: linuxserver/dokuwiki
|
image: reg.cadoles.com/envole/nineskeletor
|
||||||
container_name: nine-wiki
|
container_name: nine-nineskeletor
|
||||||
env_file: ./tmp/.env.wiki
|
restart: unless-stopped
|
||||||
|
env_file: ./services/50-nineskeletor/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
ports:
|
volumes:
|
||||||
- 9000:80
|
- ./services/50-nineskeletor/volume/data/private:/app/uploads
|
||||||
|
- ./services/50-nineskeletor/volume/data/public:/app/public/uploads
|
||||||
|
|
||||||
# Wordpress
|
# Wordpress
|
||||||
# Reseau de blog
|
# Reseau de blog
|
||||||
|
@ -183,19 +116,11 @@ services:
|
||||||
image: reg.cadoles.com/envole/wordpress
|
image: reg.cadoles.com/envole/wordpress
|
||||||
container_name: nine-wordpress
|
container_name: nine-wordpress
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
env_file: ./services/50-wordpress/env/.env.merge
|
||||||
test: curl --fail http://localhost/wordpress || exit 1
|
|
||||||
interval: 1s
|
|
||||||
timeout: 60s
|
|
||||||
env_file: ./tmp/.env.wordpress
|
|
||||||
networks:
|
networks:
|
||||||
nine-network:
|
- nine-network
|
||||||
aliases:
|
|
||||||
- blog
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./volume/wordpress/data:/app/public/wp-content
|
- ./services/50-wordpress/volume/data:/app/public/wp-content
|
||||||
|
|
||||||
#== SERVIVES DEVELOPPEUR ==================================================================================================================
|
|
||||||
|
|
||||||
# Adminer
|
# Adminer
|
||||||
# Gestionnaire BDD
|
# Gestionnaire BDD
|
||||||
|
@ -204,11 +129,9 @@ services:
|
||||||
image: docker.io/library/adminer
|
image: docker.io/library/adminer
|
||||||
container_name: nine-adminer
|
container_name: nine-adminer
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: ./tmp/.env.adminer
|
env_file: ./services/90-adminer/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
ports:
|
|
||||||
- 9100:8080
|
|
||||||
|
|
||||||
# Phpldapadmin
|
# Phpldapadmin
|
||||||
# Gestionnaire Annuaire
|
# Gestionnaire Annuaire
|
||||||
|
@ -217,16 +140,9 @@ services:
|
||||||
image: docker.io/osixia/phpldapadmin:latest
|
image: docker.io/osixia/phpldapadmin:latest
|
||||||
container_name: nine-phpldapadmin
|
container_name: nine-phpldapadmin
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: ./tmp/.env.phpldapadmin
|
env_file: ./services/90-phpldapadmin/env/.env.merge
|
||||||
networks:
|
networks:
|
||||||
- nine-network
|
- nine-network
|
||||||
ports:
|
|
||||||
- "9101:80"
|
|
||||||
|
|
||||||
#== NETWORKS ==============================================================================================================================
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
nine-network:
|
nine-network:
|
||||||
name: nine-network
|
name: nine-network
|
||||||
|
|
||||||
|
|
|
@ -48,21 +48,23 @@ MARIADB_PASSWORD=${ADMIN_PASSWORD}
|
||||||
REDIS_SERVICE_NAME=redis
|
REDIS_SERVICE_NAME=redis
|
||||||
REDIS_ACTIVATE=1
|
REDIS_ACTIVATE=1
|
||||||
REDIS_LOCAL=1
|
REDIS_LOCAL=1
|
||||||
|
REDIS_HOST=${REDIS_SERVICE_NAME}
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
# MINIO
|
# MINIO
|
||||||
MINIO_SERVICE_NAME=minio
|
MINIO_SERVICE_NAME=minio
|
||||||
MINIO_ACTIVATE=1
|
MINIO_ACTIVATE=1
|
||||||
MINIO_LOCAL=1
|
MINIO_LOCAL=1
|
||||||
MINIO_HOST=${MINIO_SERVICE_NAME}
|
MINIO_HOST=${MINIO_SERVICE_NAME}
|
||||||
MINIO_PORT=7200
|
MINIO_PORT=9000
|
||||||
MINIO_URL=${PROTOCOLE}://${WEB_URL}/minio
|
MINIO_URL=${PROTOCOLE}://${WEB_URL}:9001
|
||||||
|
|
||||||
|
|
||||||
# LDAP
|
# LDAP
|
||||||
# LDAP_SYNC Si MASTERIDENTITY = SQL permet la synchronisation des utilisateurs SQL vers LDAP
|
# LDAP_SYNC Si MASTERIDENTITY = SQL permet la synchronisation des utilisateurs SQL vers LDAP
|
||||||
OPENLDAP_SERVICE_NAME=openldap
|
OPENLDAP_SERVICE_NAME=openldap
|
||||||
LDAP_ACTIVATE=1
|
OPENLDAP_ACTIVATE=1
|
||||||
LDAP_LOCAL=1
|
OPENLDAP_LOCAL=1
|
||||||
LDAP_TYPE=LDAP
|
LDAP_TYPE=LDAP
|
||||||
LDAP_HOST=${OPENLDAP_SERVICE_NAME}
|
LDAP_HOST=${OPENLDAP_SERVICE_NAME}
|
||||||
LDAP_PORT=1389
|
LDAP_PORT=1389
|
||||||
|
@ -71,10 +73,11 @@ LDAP_BASEDN=dc=nine,dc=org
|
||||||
LDAP_ADMIN_USERNAME=${ADMIN_USER}
|
LDAP_ADMIN_USERNAME=${ADMIN_USER}
|
||||||
LDAP_USER=cn=${LDAP_ADMIN_USERNAME},${LDAP_BASEDN}
|
LDAP_USER=cn=${LDAP_ADMIN_USERNAME},${LDAP_BASEDN}
|
||||||
LDAP_PASSWORD=${ADMIN_PASSWORD}
|
LDAP_PASSWORD=${ADMIN_PASSWORD}
|
||||||
LDAP_BASEUSER=ou=users,ou=ninegate,${LDAP_BASEDN}
|
LDAP_BASEORGANISATION=ou=ninegate,${LDAP_BASEDN}
|
||||||
LDAP_BASENIVEAU01=ou=niveau01,ou=ninegate,${LDAP_BASEDN}
|
LDAP_BASEUSER=ou=users,${LDAP_BASEORGANISATION}
|
||||||
LDAP_BASENIVEAU02=ou=niveau02,ou=ninegate,${LDAP_BASEDN}
|
LDAP_BASENIVEAU01=ou=niveau01,${LDAP_BASEORGANISATION}
|
||||||
LDAP_BASEGROUP=ou=groups,ou=ninegate,${LDAP_BASEDN}
|
LDAP_BASENIVEAU02=ou=niveau02,${LDAP_BASEORGANISATION}
|
||||||
|
LDAP_BASEGROUP=ou=groups,${LDAP_BASEORGANISATION}
|
||||||
LDAP_SYNC=1
|
LDAP_SYNC=1
|
||||||
LDAP_TEMPLATE=open
|
LDAP_TEMPLATE=open
|
||||||
LDAP_USERNAME=uid
|
LDAP_USERNAME=uid
|
||||||
|
@ -103,11 +106,12 @@ CAS_PORT=8999
|
||||||
CAS_PATH=/auth/realms/nine/protocol/cas
|
CAS_PATH=/auth/realms/nine/protocol/cas
|
||||||
CAS_URL=${PROTOCOLE}://${CAS_HOST}:${CAS_PORT}
|
CAS_URL=${PROTOCOLE}://${CAS_HOST}:${CAS_PORT}
|
||||||
|
|
||||||
# NINEBOARD
|
|
||||||
NINEBOARD_SERVICE_NAME=nineboard
|
# DOKUWIKI
|
||||||
NINEBOARD_ACTIVATE=1
|
DOKUWIKI_SERVICE_NAME=dokuwiki
|
||||||
NINEBOARD_LOCAL=1
|
DOKUWIKI_ACTIVATE=0
|
||||||
NINEBOARD_URL=${PROTOCOLE}://${WEB_URL}/nineboard
|
DOKUWIKI_LOCAL=1
|
||||||
|
DOKUWIKI_URL=${PROTOCOLE}://${WEB_URL}/dokuwiki
|
||||||
|
|
||||||
# NEXTCLOUD
|
# NEXTCLOUD
|
||||||
NEXTCLOUD_SERVICE_NAME=nextcloud
|
NEXTCLOUD_SERVICE_NAME=nextcloud
|
||||||
|
@ -116,17 +120,23 @@ NEXTCLOUD_LOCAL=1
|
||||||
NEXTCLOUD_URL=${PROTOCOLE}://${WEB_URL}/nextcloud
|
NEXTCLOUD_URL=${PROTOCOLE}://${WEB_URL}/nextcloud
|
||||||
NEXTCLOUD_SAMBA=0
|
NEXTCLOUD_SAMBA=0
|
||||||
|
|
||||||
|
# NINEBOARD
|
||||||
|
NINEBOARD_SERVICE_NAME=nineboard
|
||||||
|
NINEBOARD_ACTIVATE=1
|
||||||
|
NINEBOARD_LOCAL=1
|
||||||
|
NINEBOARD_URL=${PROTOCOLE}://${WEB_URL}/nineboard
|
||||||
|
|
||||||
# NINEGATE
|
# NINEGATE
|
||||||
NINEGATE_SERVICE_NAME=ninegate
|
NINEGATE_SERVICE_NAME=ninegate
|
||||||
NINEGATE_ACTIVATE=1
|
NINEGATE_ACTIVATE=1
|
||||||
NINEGATE_LOCAL=1
|
NINEGATE_LOCAL=1
|
||||||
NINEGATE_URL=${PROTOCOLE}://${WEB_URL}/ninegate
|
NINEGATE_URL=${PROTOCOLE}://${WEB_URL}/ninegate
|
||||||
|
|
||||||
# WIKI
|
# NINESKELETOR
|
||||||
WIKI_SERVICE_NAME=wiki
|
NINESKELETOR_SERVICE_NAME=nineskeletor
|
||||||
WIKI_ACTIVATE=1
|
NINESKELETOR_ACTIVATE=1
|
||||||
WIKI_LOCAL=1
|
NINESKELETOR_LOCAL=1
|
||||||
WIKI_URL=${PROTOCOLE}://${WEB_URL}/wiki
|
NINESKELETOR_URL=${PROTOCOLE}://${WEB_URL}/nineskeletor
|
||||||
|
|
||||||
# WORDPRESS
|
# WORDPRESS
|
||||||
WORDPRESS_SERVICE_NAME=wordpress
|
WORDPRESS_SERVICE_NAME=wordpress
|
||||||
|
|
186
misc/e-ihm.sh
|
@ -1,186 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
TPUT=/usr/bin/tput
|
|
||||||
#test si TPUT est utilisable
|
|
||||||
if [ ! "$TERM" = "" ] && $TPUT hpa 60 >/dev/null 2>&1 && $TPUT setaf 1 >/dev/null 2>&1; then
|
|
||||||
FANCYTTY=1
|
|
||||||
else
|
|
||||||
FANCYTTY=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
Pause() {
|
|
||||||
if [ "$ModeTxt" == "yes" ];then
|
|
||||||
echo
|
|
||||||
elif [ "$ModeEad" == "yes" ];then
|
|
||||||
echo "<br>"
|
|
||||||
else
|
|
||||||
[ $FANCYTTY = 1 ] && $TPUT setaf 6
|
|
||||||
echo " Appuyez sur Entrée pour continuer ..."
|
|
||||||
[ $FANCYTTY = 1 ] && $TPUT sgr0
|
|
||||||
read BiDon
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
Echo() {
|
|
||||||
if [ "$ModeEad" != "yes" ];
|
|
||||||
then
|
|
||||||
echo "$1"
|
|
||||||
else
|
|
||||||
echo "$1<br>"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoColor() {
|
|
||||||
if [ "$ModeTxt" = "yes" ];then
|
|
||||||
echo "$1"
|
|
||||||
elif [ "$ModeEad" = "yes" ];then
|
|
||||||
echo "<FONT color=\"$3\"> $1 </FONT><br>"
|
|
||||||
else
|
|
||||||
[ "$FANCYTTY" = 1 ] && $TPUT setaf $2
|
|
||||||
echo "$1"
|
|
||||||
[ "$FANCYTTY" = 1 ] && $TPUT sgr0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoRouge() {
|
|
||||||
EchoColor "$1" "1" "red"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoVert() {
|
|
||||||
EchoColor "$1" "2" "green"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoOrange() {
|
|
||||||
EchoColor "$1" "3" "orange"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoBleu() {
|
|
||||||
EchoColor "$1" "4" "blue"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoMagenta() {
|
|
||||||
EchoColor "$1" "5" "magenta"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoCyan() {
|
|
||||||
EchoColor "$1" "6" "cyan"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoBlanc() {
|
|
||||||
EchoColor "$1" "7" "white"
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoGras() {
|
|
||||||
if [ "$ModeTxt" == "yes" ];then
|
|
||||||
echo "$1"
|
|
||||||
elif [ "$ModeEad" == "yes" ];then
|
|
||||||
echo "<b> $1 </b><br>"
|
|
||||||
else
|
|
||||||
[ $FANCYTTY = 1 ] && $TPUT bold
|
|
||||||
echo "$1"
|
|
||||||
[ $FANCYTTY = 1 ] && $TPUT sgr0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
Clear() {
|
|
||||||
if [ "$ModeEad" != "yes" -a "$ModeTxt" != "yes" ];then
|
|
||||||
clear
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
Question_ouinon() {
|
|
||||||
#attention, il faut synchroniser les modifications avec /usr/share/pyshared/pyeole/ihm.py
|
|
||||||
question=$1
|
|
||||||
[ "$2" = "" ] && interactive='True' || interactive=$2
|
|
||||||
[ "$3" = "" ] && default="non" || default=$3
|
|
||||||
[ "$4" = "" ] && level="info" || level=$4
|
|
||||||
[ "$5" = "" ] && default_uninteractive=$default || default_uninteractive=$5
|
|
||||||
[ ! "$interactive" = "True" ] && [ ! "$interactive" = "False" ] && echo "Question_ouinon : interactive doit être True ou False" && exit 1
|
|
||||||
[ ! "$default" = "oui" ] && [ ! "$default" = "non" ] && echo "Question_ouinon : default doit etre oui ou non" && exit 1
|
|
||||||
[ ! "$default_uninteractive" = "oui" ] && [ ! "$default_uninteractive" = "non" ] && echo "Question_ouinon : default_uninteractive doit etre oui ou non" && exit 1
|
|
||||||
[ ! "$level" = "info" ] && [ ! "$level" = "warn" ] && [ ! "$level" = "err" ] && echo "Question_ouinon : level doit etre info, warn ou err" && exit 1
|
|
||||||
#non interactive
|
|
||||||
if [ "$interactive" = "False" ]; then
|
|
||||||
Rep=default_uninteractive
|
|
||||||
else
|
|
||||||
question="$question [oui/non]"
|
|
||||||
if [ $level = "info" ]; then
|
|
||||||
echo "$question"
|
|
||||||
elif [ $level = "warn" ]; then
|
|
||||||
EchoOrange "$question"
|
|
||||||
else
|
|
||||||
EchoRouge "$question"
|
|
||||||
fi
|
|
||||||
echo -n "[$default] : "
|
|
||||||
read Rep
|
|
||||||
#passe en minuscule
|
|
||||||
Rep=`echo $Rep | tr A-Z a-z`
|
|
||||||
fi
|
|
||||||
if [ "$default" = "non" ]; then
|
|
||||||
if [ "$Rep" = "oui" -o "$Rep" = "o" -o "$Rep" = "yes" -o "$Rep" = "y" ];then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "$Rep" = "non" -o "$Rep" = "n" -o "$Rep" = "no" ];then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
EchoStart() {
|
|
||||||
for i in $(eval echo "{1..30}")
|
|
||||||
do
|
|
||||||
ligne+="="
|
|
||||||
done
|
|
||||||
clear
|
|
||||||
}
|
|
||||||
|
|
||||||
BigTitle(){
|
|
||||||
size=`tput cols`
|
|
||||||
nb=${#1}
|
|
||||||
nbchar=$(($size - $nb - 4))
|
|
||||||
|
|
||||||
ligne=""
|
|
||||||
for i in $(eval echo "{1..$size}")
|
|
||||||
do
|
|
||||||
ligne+="="
|
|
||||||
done
|
|
||||||
|
|
||||||
finligne=""
|
|
||||||
for i in $(eval echo "{1..$nbchar}")
|
|
||||||
do
|
|
||||||
finligne+="="
|
|
||||||
done
|
|
||||||
|
|
||||||
echo
|
|
||||||
EchoVert $ligne
|
|
||||||
EchoVert "== $1 $finligne"
|
|
||||||
EchoVert $ligne
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
Title(){
|
|
||||||
size=`tput cols`
|
|
||||||
nb=${#1}
|
|
||||||
nbchar=$(($size - $nb - 4))
|
|
||||||
|
|
||||||
ligne=""
|
|
||||||
for i in $(eval echo "{1..$size}")
|
|
||||||
do
|
|
||||||
ligne+="="
|
|
||||||
done
|
|
||||||
|
|
||||||
finligne=""
|
|
||||||
for i in $(eval echo "{1..$nbchar}")
|
|
||||||
do
|
|
||||||
finligne+="="
|
|
||||||
done
|
|
||||||
|
|
||||||
echo
|
|
||||||
EchoCyan "== $1 $finligne"
|
|
||||||
echo
|
|
||||||
}
|
|
|
@ -184,3 +184,55 @@ Title(){
|
||||||
EchoCyan "== $1 $finligne"
|
EchoCyan "== $1 $finligne"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fonction pour fusionner plusieurs fichiers .env
|
||||||
|
mergeenv() {
|
||||||
|
# Vérifier si au moins deux fichiers .env sont fournis
|
||||||
|
if [ "$#" -lt 2 ]; then
|
||||||
|
echo "Usage: merge_env_files output_file .env_file1 .env_file2 [additional .env files...]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Le premier argument est le fichier de sortie
|
||||||
|
output_file=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Déclaration des structures de données pour stocker les variables et maintenir l'ordre
|
||||||
|
declare -A env_vars
|
||||||
|
declare -a env_keys
|
||||||
|
|
||||||
|
# Fonction pour lire un fichier .env et mettre à jour les structures de données
|
||||||
|
read_env_file() {
|
||||||
|
local env_file=$1
|
||||||
|
|
||||||
|
# Lire chaque ligne du fichier .env
|
||||||
|
while IFS='=' read -r key value; do
|
||||||
|
# Ignorer les lignes vides et les commentaires
|
||||||
|
[[ -z "$key" || "$key" =~ ^# ]] && continue
|
||||||
|
|
||||||
|
# Vérifier si la variable existe déjà
|
||||||
|
if [[ -z "${env_vars[$key]}" ]]; then
|
||||||
|
# Ajouter la clé à la liste des clés si elle n'existe pas encore
|
||||||
|
env_keys+=("$key")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Mettre à jour le tableau associatif
|
||||||
|
env_vars["$key"]="$value"
|
||||||
|
done < "$env_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lire chaque fichier .env et mettre à jour les structures de données
|
||||||
|
for env_file in "$@"; do
|
||||||
|
if [ -f "$env_file" ]; then
|
||||||
|
read_env_file "$env_file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Écrire les variables dans le fichier de sortie dans l'ordre d'apparition
|
||||||
|
{
|
||||||
|
for key in "${env_keys[@]}"; do
|
||||||
|
echo "$key=${env_vars[$key]}"
|
||||||
|
done
|
||||||
|
} > "$output_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
528
nine.sh
|
@ -3,81 +3,56 @@
|
||||||
#1 : action = default up
|
#1 : action = default up
|
||||||
#2 : service = optionnel
|
#2 : service = optionnel
|
||||||
|
|
||||||
# Fusionner l'ensemble des fichier .env en un seul
|
# Include bibliotheque de fonction
|
||||||
rm -f ./.env.local
|
. ./misc/tools/e-ihm.sh
|
||||||
cat ./env/.env* >> ./.env.local
|
|
||||||
. ./misc/e-ihm.sh
|
# Include variable d'environnement global
|
||||||
. ./env/.env
|
mergeenv env/.env.merge env/.env env/.env.local
|
||||||
if [ -f ./env/.env.local ]
|
. env/.env.merge
|
||||||
then
|
|
||||||
. ./env/.env.local
|
# Construction du docker-compose
|
||||||
fi
|
echo "services:" > docker-compose.yml
|
||||||
|
|
||||||
|
# Include service
|
||||||
|
declare -A services
|
||||||
|
for dir in $(ls -d "services"/[0-9][0-9]-* | sort); do
|
||||||
|
# Include bibliotheque de fonction
|
||||||
|
if [ -f "$dir/misc/nine.sh" ]; then
|
||||||
|
. $dir/misc/nine.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Include variable d'environnement global
|
||||||
|
if [ -f "$dir/env/.env" ]; then
|
||||||
|
. $dir/env/.env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Include variable d'environnement local
|
||||||
|
if [ -f "$dir/env/.env.local" ]; then
|
||||||
|
. $dir/env/.env.local
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Construction du docker-compose
|
||||||
|
if [ -f "$dir/dockercompose/dockercompose.yml" ]; then
|
||||||
|
cat "$dir/dockercompose/dockercompose.yml" >> docker-compose.yml
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Construction .env.merge
|
||||||
|
mergeenv $dir/env/.env.merge env/.env.merge $dir/env/.env $dir/env/.env.local
|
||||||
|
|
||||||
|
# Sauvegarder le service
|
||||||
|
key="${dir##*-}"
|
||||||
|
value="${dir##*/}"
|
||||||
|
services["$key"]="$value"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Construction du docker-compose
|
||||||
|
echo "networks:" >> docker-compose.yml
|
||||||
|
echo " nine-network:" >> docker-compose.yml
|
||||||
|
echo " name: nine-network" >> docker-compose.yml
|
||||||
|
|
||||||
# Start script
|
# Start script
|
||||||
BigTitle "NINE"
|
BigTitle "NINE"
|
||||||
|
|
||||||
# Include
|
|
||||||
. ./.env.local
|
|
||||||
|
|
||||||
#===========================================================================================================================================
|
|
||||||
#== ENV ====================================================================================================================================
|
|
||||||
#===========================================================================================================================================
|
|
||||||
#1 = service to stop if null all service
|
|
||||||
|
|
||||||
destroyall(){
|
|
||||||
Question_ouinon "Souhaitez-vous supprimer l'ensemble des containers : Attention cela supprimera vraiment tout ?"
|
|
||||||
if [[ "$?" = 0 ]]
|
|
||||||
then
|
|
||||||
destroy $NINEAPACHE_SERVICE_NAME 1
|
|
||||||
destroy $MARIADB_SERVICE_NAME 1
|
|
||||||
destroy $REDIS_SERVICE_NAME 1
|
|
||||||
destroy $MINIO_SERVICE_NAME 1
|
|
||||||
destroy $OPENLDAP_SERVICE_NAME 1
|
|
||||||
destroy $KEYCLOAK_SERVICE_NAME 1
|
|
||||||
|
|
||||||
destroy $NEXTCLOUD_SERVICE_NAME 1
|
|
||||||
destroy $NINEBOARD_SERVICE_NAME 1
|
|
||||||
destroy $NINEGATE_SERVICE_NAME 1
|
|
||||||
destroy $WIKI_SERVICE_NAME 1
|
|
||||||
destroy $WORDPRESS_SERVICE_NAME 1
|
|
||||||
|
|
||||||
destroy $ADMINER_SERVICE_NAME 1
|
|
||||||
destroy $PHPLDAPADMIN_SERVICE_NAME 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
env() {
|
|
||||||
rm -rf ./tmp/.env.$1
|
|
||||||
mkdir -p ./tmp
|
|
||||||
|
|
||||||
cat ./env/.env >> ./tmp/.env.$1
|
|
||||||
if [[ -f ./env/.env.local ]]; then cat ./env/.env.local >> ./tmp/.env.$1; fi
|
|
||||||
if [[ -f ./env/.env.zapp.$1 ]]; then cat ./env/.env.zapp.$1 >> ./tmp/.env.$1; fi
|
|
||||||
if [[ -f ./env/.env.zapp.$1.local ]]; then cat ./env/.env.zapp.$1.local >> ./tmp/.env.$1; fi
|
|
||||||
};
|
|
||||||
|
|
||||||
#===========================================================================================================================================
|
|
||||||
#== ENVALL =================================================================================================================================
|
|
||||||
#===========================================================================================================================================
|
|
||||||
|
|
||||||
envall(){
|
|
||||||
env $NINEAPACHE_SERVICE_NAME
|
|
||||||
env $MARIADB_SERVICE_NAME
|
|
||||||
env $REDIS_SERVICE_NAME
|
|
||||||
env $MINIO_SERVICE_NAME
|
|
||||||
env $OPENLDAP_SERVICE_NAME
|
|
||||||
env $KEYCLOAK_SERVICE_NAME
|
|
||||||
|
|
||||||
env $NEXTCLOUD_SERVICE_NAME
|
|
||||||
env $NINEBOARD_SERVICE_NAME
|
|
||||||
env $NINEGATE_SERVICE_NAME
|
|
||||||
env $WIKI_SERVICE_NAME
|
|
||||||
env $WORDPRESS_SERVICE_NAME
|
|
||||||
|
|
||||||
env $ADMINER_SERVICE_NAME
|
|
||||||
env $PHPLDAPADMIN_SERVICE_NAME
|
|
||||||
}
|
|
||||||
|
|
||||||
#===========================================================================================================================================
|
#===========================================================================================================================================
|
||||||
#== STOP ===================================================================================================================================
|
#== STOP ===================================================================================================================================
|
||||||
#===========================================================================================================================================
|
#===========================================================================================================================================
|
||||||
|
@ -87,7 +62,10 @@ envall(){
|
||||||
stop() {
|
stop() {
|
||||||
if [[ "$2" != 1 ]]; then Title "STOP"; fi
|
if [[ "$2" != 1 ]]; then Title "STOP"; fi
|
||||||
|
|
||||||
|
echo "docker-compose stop $1"
|
||||||
docker-compose stop $1
|
docker-compose stop $1
|
||||||
|
|
||||||
|
if [[ "$2" != 1 ]]; then echo; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#===========================================================================================================================================
|
#===========================================================================================================================================
|
||||||
|
@ -115,68 +93,13 @@ wait_for_container() {
|
||||||
}
|
}
|
||||||
|
|
||||||
upservice(){
|
upservice(){
|
||||||
docker-compose up -d $1
|
docker-compose up -d $1 --remove-orphans
|
||||||
if [[ $2 == "wait" ]]
|
if [[ $2 == "wait" ]]
|
||||||
then
|
then
|
||||||
wait_for_container $1
|
wait_for_container $1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function upnineapache {
|
|
||||||
if [[ $NINEAPACHE_ACTIVATE == 1 && $NINEAPACHE_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${NINEAPACHE_SERVICE_NAME^^}
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice ${NINEAPACHE_SERVICE_NAME}
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upmariadb {
|
|
||||||
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title "MARIADB"
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice $MARIADB_SERVICE_NAME wait
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upredis {
|
|
||||||
if [[ $REDIS_ACTIVATE == 1 && $REDIS_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title "REDIS"
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice $REDIS_SERVICE_NAME
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upminio {
|
|
||||||
if [[ $MINIO_ACTIVATE == 1 && $MINIO_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title "MINIO"
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice $MINIO_SERVICE_NAME
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upopenldap {
|
|
||||||
if [[ $LDAP_ACTIVATE == 1 && $LDAP_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${OPENLDAP_SERVICE_NAME^^}
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
|
|
||||||
mkdir -p ./volume/openldap/data
|
|
||||||
chmod a+wr ./volume/openldap/data
|
|
||||||
|
|
||||||
upservice $OPENLDAP_SERVICE_NAME wait
|
|
||||||
docker-compose exec $OPENLDAP_SERVICE_NAME /nine/init.sh
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upkeycloak {
|
function upkeycloak {
|
||||||
if [[ $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
|
if [[ $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
|
||||||
then
|
then
|
||||||
|
@ -197,6 +120,16 @@ function upkeycloak {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updokuwiki {
|
||||||
|
if [[ $DOKUWIKI_ACTIVATE == 1 && $DOKUWIKI_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title ${DOKUWIKI_SERVICE_NAME^^}
|
||||||
|
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice ${DOKUWIKI_SERVICE_NAME}
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function upnextcloud {
|
function upnextcloud {
|
||||||
if [[ $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
|
if [[ $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
|
||||||
|
@ -238,80 +171,23 @@ function upnineboard {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function upninegate {
|
|
||||||
if [[ $NINEGATE_ACTIVATE == 1 && $NINEGATE_LOCAL == 1 ]]
|
function upnineskeletor {
|
||||||
|
if [[ $NINESKELETOR_ACTIVATE == 1 && $NINESKELETOR_LOCAL == 1 ]]
|
||||||
then
|
then
|
||||||
Title ${NINEGATE_SERVICE_NAME^^}
|
Title ${NINESKELETOR_SERVICE_NAME^^}
|
||||||
|
|
||||||
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
||||||
then
|
then
|
||||||
EchoVert "DATABASE"
|
EchoVert "DATABASE"
|
||||||
Echo ${NINEGATE_SERVICE_NAME^^}
|
Echo ${NINESKELETOR_SERVICE_NAME^^}
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $NINEGATE_SERVICE_NAME
|
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $NINESKELETOR_SERVICE_NAME
|
||||||
Echo
|
Echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EchoVert "CONTAINER"
|
EchoVert "CONTAINER"
|
||||||
upservice ${NINEGATE_SERVICE_NAME}
|
upservice ${NINESKELETOR_SERVICE_NAME}
|
||||||
chmod -R a+wr ./volume/ninegate/data
|
chmod -R a+wr ./volume/nineskeletor/data
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upwiki {
|
|
||||||
if [[ $WIKI_ACTIVATE == 1 && $WIKI_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${WIKI_SERVICE_NAME^^}
|
|
||||||
|
|
||||||
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
EchoVert "DATABASE"
|
|
||||||
Echo ${WIKI_SERVICE_NAME^^}
|
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $WIKI_SERVICE_NAME
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice ${WIKI_SERVICE_NAME}
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upwordpress {
|
|
||||||
if [[ $WORDPRESS_ACTIVATE == 1 && $WORDPRESS_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${WORDPRESS_SERVICE_NAME^^}
|
|
||||||
|
|
||||||
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
EchoVert "DATABASE"
|
|
||||||
Echo ${WORDPRESS_SERVICE_NAME^^}
|
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $WORDPRESS_SERVICE_NAME
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice ${WORDPRESS_SERVICE_NAME}
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upadminer {
|
|
||||||
if [[ $ADMINER_ACTIVATE == 1 && $ADMINER_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${ADMINER_SERVICE_NAME^^}
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice ${ADMINER_SERVICE_NAME}
|
|
||||||
Echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function upphpldapadmin {
|
|
||||||
if [[ $PHPLDAPADMIN_ACTIVATE == 1 && $PHPLDAPADMIN_LOCAL == 1 ]]
|
|
||||||
then
|
|
||||||
Title ${PHPLDAPADMIN_SERVICE_NAME^^}
|
|
||||||
EchoVert "CONTAINER"
|
|
||||||
upservice ${PHPLDAPADMIN_SERVICE_NAME}
|
|
||||||
Echo
|
Echo
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -329,62 +205,11 @@ up(){
|
||||||
# SERVICES
|
# SERVICES
|
||||||
if [[ -z "$1" ]]
|
if [[ -z "$1" ]]
|
||||||
then
|
then
|
||||||
# NETWORK
|
# Pour chaque répertoire service on execute sa fonction up
|
||||||
if [[ "$RELEASE_SYSTEM" == "eole" ]]
|
for key in $(for k in "${!services[@]}"; do echo "$k:${services[$k]}"; done | sort -t: -k2,2 | cut -d: -f1); do
|
||||||
then
|
up${key}
|
||||||
Title "NETWORK"
|
done
|
||||||
EchoRouge "ATTENTION SOLUTION DE CONTOURNEMENT POUR LE POC"
|
|
||||||
EchoRouge "A résoudre si l'on souhaite mettre en production"
|
|
||||||
|
|
||||||
# On réinstall docker-ce car le reconf détruit le reseau docker, la reinstall de docker-ce rétablit le reseau
|
|
||||||
apt-get install docker-ce --reinstall
|
|
||||||
|
|
||||||
# ATTENTION A REVOIR car ouvre complétement le firewall
|
|
||||||
iptables -P INPUT ACCEPT
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# NINEAPACHE
|
|
||||||
upnineapache
|
|
||||||
|
|
||||||
# MARIADB
|
|
||||||
upmariadb
|
|
||||||
|
|
||||||
# REDIS
|
|
||||||
upredis
|
|
||||||
|
|
||||||
# MINIO
|
|
||||||
upminio
|
|
||||||
|
|
||||||
# OPENLDAP
|
|
||||||
upopenldap
|
|
||||||
|
|
||||||
# KEYCLOAK
|
|
||||||
upkeycloak
|
|
||||||
|
|
||||||
# NEXTCLOUD
|
|
||||||
upnextcloud
|
|
||||||
|
|
||||||
# NINEBOARD
|
|
||||||
upnineboard
|
|
||||||
|
|
||||||
# NINEGATE
|
|
||||||
upninegate
|
|
||||||
|
|
||||||
# WIKI
|
|
||||||
upwiki
|
|
||||||
|
|
||||||
# WORDPRESS
|
|
||||||
upwordpress
|
|
||||||
|
|
||||||
# ADMINER
|
|
||||||
upadminer
|
|
||||||
|
|
||||||
# PHPLDAPADMIN
|
|
||||||
upphpldapadmin
|
|
||||||
|
|
||||||
else
|
else
|
||||||
env ${1}
|
|
||||||
up${1}
|
up${1}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -397,21 +222,11 @@ destroyall(){
|
||||||
Question_ouinon "Souhaitez-vous supprimer l'ensemble des containers : Attention cela supprimera vraiment tout ?"
|
Question_ouinon "Souhaitez-vous supprimer l'ensemble des containers : Attention cela supprimera vraiment tout ?"
|
||||||
if [[ "$?" = 0 ]]
|
if [[ "$?" = 0 ]]
|
||||||
then
|
then
|
||||||
destroy $NINEAPACHE_SERVICE_NAME 1
|
# Pour chaque répertoire service on execute sa fonction destroy
|
||||||
destroy $MARIADB_SERVICE_NAME 1
|
# On part du dernier service vers le premiser
|
||||||
destroy $REDIS_SERVICE_NAME 1
|
for key in $(for k in "${!services[@]}"; do echo "$k:${services[$k]}"; done | sort -t: -k2,2r | cut -d: -f1); do
|
||||||
destroy $MINIO_SERVICE_NAME 1
|
destroy${key} 1
|
||||||
destroy $OPENLDAP_SERVICE_NAME 1
|
done
|
||||||
destroy $KEYCLOAK_SERVICE_NAME 1
|
|
||||||
|
|
||||||
destroy $NEXTCLOUD_SERVICE_NAME 1
|
|
||||||
destroy $NINEBOARD_SERVICE_NAME 1
|
|
||||||
destroy $NINEGATE_SERVICE_NAME 1
|
|
||||||
destroy $WIKI_SERVICE_NAME 1
|
|
||||||
destroy $WORDPRESS_SERVICE_NAME 1
|
|
||||||
|
|
||||||
destroy $ADMINER_SERVICE_NAME 1
|
|
||||||
destroy $PHPLDAPADMIN_SERVICE_NAME 1
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,102 +236,94 @@ destroyall(){
|
||||||
#1 = service to destroy
|
#1 = service to destroy
|
||||||
#2 = ne pas poser de questions
|
#2 = ne pas poser de questions
|
||||||
|
|
||||||
destroy(){
|
#destroy(){
|
||||||
Title "DESTROY "${1^^}
|
# Title "DESTROY "${1^^}
|
||||||
|
#
|
||||||
stop $1 1
|
# stop $1 1
|
||||||
docker-compose rm -s -v -f "$1"
|
# docker-compose rm -s -v -f "$1"
|
||||||
|
#
|
||||||
if [[ "$1" == "$MARIADB_SERVICE_NAME" && $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
#
|
||||||
then
|
# if [[ "$1" == "$OPENLDAP_SERVICE_NAME" && $LDAP_ACTIVATE == 1 && $LDAP_LOCAL == 1 ]]
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer l'ensemble des bases ?";fi
|
# then
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer l'annuaire associé à $1 ?";fi
|
||||||
then
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
sudo rm -rf volume/mariadb/mysql
|
# then
|
||||||
fi
|
# EchoRouge Suppression
|
||||||
fi
|
# sudo rm -rf volume/openldap/data
|
||||||
|
# fi
|
||||||
if [[ "$1" == "$OPENLDAP_SERVICE_NAME" && $LDAP_ACTIVATE == 1 && $LDAP_LOCAL == 1 ]]
|
# fi
|
||||||
then
|
#
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer l'annuaire associé à $1 ?";fi
|
# if [[ "$1" == "$KEYCLOAK_SERVICE_NAME" && $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# then
|
||||||
then
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
||||||
sudo rm -rf volume/openldap/data
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
mkdir volume/openldap/data
|
# then
|
||||||
chmod a+w volume/openldap/data -R
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $KEYCLOAK_SERVICE_NAME
|
||||||
chmod a+r volume/openldap/data -R
|
# fi
|
||||||
fi
|
# fi
|
||||||
fi
|
#
|
||||||
|
# if [[ "$1" == "$DOKUWIKI_SERVICE_NAME" && $DOKUWIKI_ACTIVATE == 1 && $DOKUWIKI_LOCAL == 1 ]]
|
||||||
if [[ "$1" == "$KEYCLOAK_SERVICE_NAME" && $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
|
# then
|
||||||
then
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# then
|
||||||
then
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $DOKUWIKI_SERVICE_NAME
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $KEYCLOAK_SERVICE_NAME
|
# sudo rm -rf volume/dokuwiki/data
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
if [[ "$1" == "$NINEGATE_SERVICE_NAME" && $NINEGATE_ACTIVATE == 1 && $NINEGATE_LOCAL == 1 ]]
|
# if [[ "$1" == "$NEXTCLOUD_SERVICE_NAME" && $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
|
||||||
then
|
# then
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ainsi que les fichiers utilisateurs ?";fi
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
then
|
# then
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINEGATE_SERVICE_NAME
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NEXTCLOUD_SERVICE_NAME
|
||||||
fi
|
# sudo rm -rf volume/nextcloud/data
|
||||||
fi
|
# sudo rm -rf volume/nextcloud/html
|
||||||
|
# sudo rm -rf volume/nextcloud/app
|
||||||
if [[ "$1" == "$NINEBOARD_SERVICE_NAME" && $NINEBOARD_ACTIVATE == 1 && $NINEBOARD_LOCAL == 1 ]]
|
# fi
|
||||||
then
|
# fi
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
#
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# if [[ "$1" == "$NINEBOARD_SERVICE_NAME" && $NINEBOARD_ACTIVATE == 1 && $NINEBOARD_LOCAL == 1 ]]
|
||||||
then
|
# then
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINEBOARD_SERVICE_NAME
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
||||||
fi
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
fi
|
# then
|
||||||
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINEBOARD_SERVICE_NAME
|
||||||
if [[ "$1" == "$NEXTCLOUD_SERVICE_NAME" && $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
|
# fi
|
||||||
then
|
# fi
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ainsi que les fichiers utilisateurs ?";fi
|
#
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# if [[ "$1" == "$NINESKELETOR_SERVICE_NAME" && $NINESKELETOR_ACTIVATE == 1 && $NINESKELETOR_LOCAL == 1 ]]
|
||||||
then
|
# then
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NEXTCLOUD_SERVICE_NAME
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
||||||
sudo rm -rf volume/nextcloud/data
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
sudo rm -rf volume/nextcloud/html
|
# then
|
||||||
sudo rm -rf volume/nextcloud/app
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINESKELETOR_SERVICE_NAME
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
if [[ "$1" == "$WIKI_SERVICE_NAME" && $WIKI_ACTIVATE == 1 && $WIKI_LOCAL == 1 ]]
|
# if [[ "$1" == "$WORDPRESS_SERVICE_NAME" && $WORDPRESS_ACTIVATE == 1 && $WORDPRESS_LOCAL == 1 ]]
|
||||||
then
|
# then
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
# if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
# if [[ "$?" = 0 || -z $2 ]]
|
||||||
then
|
# then
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $WIKI_SERVICE_NAME
|
# docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $WORDPRESS_SERVICE_NAME
|
||||||
sudo rm -rf volume/wiki/data
|
# sudo rm -rf volume/wordpress/data
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
#}
|
||||||
if [[ "$1" == "$WORDPRESS_SERVICE_NAME" && $WORDPRESS_ACTIVATE == 1 && $WORDPRESS_LOCAL == 1 ]]
|
#
|
||||||
then
|
|
||||||
if [[ -z $2 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $1 ?";fi
|
|
||||||
if [[ "$?" = 0 || -z $2 ]]
|
|
||||||
then
|
|
||||||
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $WORDPRESS_SERVICE_NAME
|
|
||||||
sudo rm -rf volume/wordpress/data
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#===========================================================================================================================================
|
#===========================================================================================================================================
|
||||||
#== MAIN ===================================================================================================================================
|
#== MAIN ===================================================================================================================================
|
||||||
#===========================================================================================================================================
|
#===========================================================================================================================================
|
||||||
|
|
||||||
envall
|
|
||||||
|
|
||||||
if [[ $1 == "up" || $1 == "" ]]
|
if [[ $1 == "up" || $1 == "" ]]
|
||||||
then
|
then
|
||||||
up $2
|
up $2
|
||||||
|
elif [[ $1 == "uplogs" || $1 == "" ]]
|
||||||
|
then
|
||||||
|
up $2
|
||||||
|
docker-compose logs -f $2
|
||||||
elif [[ $1 == "stop" ]]
|
elif [[ $1 == "stop" ]]
|
||||||
then
|
then
|
||||||
stop $2
|
stop $2
|
||||||
|
@ -539,7 +346,7 @@ then
|
||||||
EchoRouge "Vous devez precisez un service"
|
EchoRouge "Vous devez precisez un service"
|
||||||
EchoRouge "nine.sh destroy monservice"
|
EchoRouge "nine.sh destroy monservice"
|
||||||
else
|
else
|
||||||
destroy $2
|
destroy$2
|
||||||
fi
|
fi
|
||||||
elif [[ $1 == "logs" ]]
|
elif [[ $1 == "logs" ]]
|
||||||
then
|
then
|
||||||
|
@ -547,16 +354,6 @@ then
|
||||||
elif [[ $1 == "iswait" ]]
|
elif [[ $1 == "iswait" ]]
|
||||||
then
|
then
|
||||||
wait_for_container $2
|
wait_for_container $2
|
||||||
elif [[ $1 == "env" ]]
|
|
||||||
then
|
|
||||||
if [[ -z $2 ]]
|
|
||||||
then
|
|
||||||
EchoRouge "Vous devez precisez un service"
|
|
||||||
EchoRouge "nine.sh env monservice"
|
|
||||||
else
|
|
||||||
env $2
|
|
||||||
EchoVert "Fichier tmp/.env.$1 regénéré"
|
|
||||||
fi
|
|
||||||
elif [[ $1 == "regen" ]]
|
elif [[ $1 == "regen" ]]
|
||||||
then
|
then
|
||||||
if [[ -z $2 ]]
|
if [[ -z $2 ]]
|
||||||
|
@ -564,14 +361,16 @@ then
|
||||||
destroyall
|
destroyall
|
||||||
up
|
up
|
||||||
else
|
else
|
||||||
destroy $2
|
destroy$2
|
||||||
up $2
|
up$2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
EchoRouge "Action possible ="
|
EchoRouge "Action possible ="
|
||||||
EchoRouge "nine.sh > UP de l'ensemble des services actifs"
|
EchoRouge "nine.sh > UP de l'ensemble des services actifs"
|
||||||
EchoRouge "nine.sh up > UP de l'ensemble des services actifs"
|
EchoRouge "nine.sh up > UP de l'ensemble des services actifs"
|
||||||
EchoRouge "nine.sh up monservice> UP de monservice"
|
EchoRouge "nine.sh up monservice> UP de monservice"
|
||||||
|
EchoRouge "nine.sh uplogs > UP puis logs de l'ensemble des services actifs"
|
||||||
|
EchoRouge "nine.sh uplogs monservice> UP puis logs de monservice"
|
||||||
EchoRouge "nine.sh stop > STOP de l'ensemble des services"
|
EchoRouge "nine.sh stop > STOP de l'ensemble des services"
|
||||||
EchoRouge "nine.sh stop monservice> STOP de monservice"
|
EchoRouge "nine.sh stop monservice> STOP de monservice"
|
||||||
EchoRouge "nine.sh bash monservice> lance un terminel dans le conteneur de monservice"
|
EchoRouge "nine.sh bash monservice> lance un terminel dans le conteneur de monservice"
|
||||||
|
@ -580,7 +379,6 @@ else
|
||||||
EchoRouge "nine.sh logs > LOGS de l'ensemble des services"
|
EchoRouge "nine.sh logs > LOGS de l'ensemble des services"
|
||||||
EchoRouge "nine.sh logs monservice > LOGS de monservice"
|
EchoRouge "nine.sh logs monservice > LOGS de monservice"
|
||||||
EchoRouge "nine.sh iswait monservice > monservice est-il en cours de construction"
|
EchoRouge "nine.sh iswait monservice > monservice est-il en cours de construction"
|
||||||
EchoRouge "nine.sh env monservice > regeneration du fichier d'environnement de monservice"
|
|
||||||
EchoRouge "nine.sh regen > lance destroyall puis up sur l'ensemble des service"
|
EchoRouge "nine.sh regen > lance destroyall puis up sur l'ensemble des service"
|
||||||
EchoRouge "nine.sh regen monservice > lance destroy monservice puis up monservice"
|
EchoRouge "nine.sh regen monservice > lance destroy monservice puis up monservice"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
# Nineapache
|
||||||
|
# Reverse proxy de l'ensemble des services
|
||||||
|
# Seul port ouvert sur l'exterieur
|
||||||
|
nineapache:
|
||||||
|
image: reg.cadoles.com/envole/nineapache:8.1
|
||||||
|
container_name: nine-nineapache
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost || exit 1
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./services/10-nineapache/env/.env.merge
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./services/10-nineapache/volume/nine/apache.conf:/etc/apache2/conf.d/zapp.conf
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function upnineapache {
|
||||||
|
if [[ $NINEAPACHE_ACTIVATE == 1 && $NINEAPACHE_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title ${NINEAPACHE_SERVICE_NAME^^}
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice ${NINEAPACHE_SERVICE_NAME}
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroynineapache {
|
||||||
|
if [[ $NINEAPACHE_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY ${NINEAPACHE_SERVICE_NAME}"
|
||||||
|
|
||||||
|
stop ${NINEAPACHE_SERVICE_NAME} 1
|
||||||
|
docker-compose rm -s -v -f "${NINEAPACHE_SERVICE_NAME}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
LoadModule rewrite_module modules/mod_rewrite.so
|
LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
|
|
||||||
ServerName nineapache.local
|
ServerName nineapache.local
|
||||||
|
|
||||||
# Options Proxy
|
# Options Proxy
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
@ -16,41 +16,56 @@ RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
|
||||||
RequestHeader set Host "%{HTTP_HOST}s"
|
RequestHeader set Host "%{HTTP_HOST}s"
|
||||||
RequestHeader set X-Forwarded-Proto "http"
|
RequestHeader set X-Forwarded-Proto "http"
|
||||||
|
|
||||||
# Services Outils
|
# Keycloak
|
||||||
ProxyPass /auth http://keycloak:8999/auth retry=0 keepalive=On
|
ProxyPass /auth http://keycloak:8999/auth retry=0 keepalive=On
|
||||||
ProxyPassReverse /auth http://keycloak:8999/auth retry=0
|
ProxyPassReverse /auth http://keycloak:8999/auth retry=0
|
||||||
|
|
||||||
ProxyPass /minio http://minio:9001 retry=0 keepalive=On
|
# Minio = pour l'instant je n'arrive pas à faire fonctionner la console minio derrière un proxy
|
||||||
ProxyPassReverse /minio http://minio:9001 retry=0
|
#ProxyPass /minio http://minio:9001 retry=0 keepalive=On
|
||||||
|
#ProxyPassReverse /minio http://minio:9001 retry=0
|
||||||
|
#RewriteEngine On
|
||||||
|
#RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
||||||
|
#RewriteRule /minio/(.*) ws://minio:9001/$1 [P,L]
|
||||||
|
#RewriteCond %{HTTP:Upgrade} !=websocket [NC]
|
||||||
|
#RewriteRule /minio/(.*) http://minio:9001/$1 [P,L]
|
||||||
|
|
||||||
# Services Applicatif
|
# Nextcloud
|
||||||
ProxyPass /nextcloud http://nextcloud retry=0 keepalive=On
|
ProxyPass /nextcloud http://nextcloud retry=0 keepalive=On
|
||||||
ProxyPassReverse /nextcloud http://nextcloud retry=0
|
ProxyPassReverse /nextcloud http://nextcloud retry=0
|
||||||
|
|
||||||
|
# Nineboard
|
||||||
ProxyPass /nineboard http://nineboard/nineboard retry=0 keepalive=On
|
ProxyPass /nineboard http://nineboard/nineboard retry=0 keepalive=On
|
||||||
ProxyPassReverse /nineboard http://nineboard/nineboard retry=0
|
ProxyPassReverse /nineboard http://nineboard/nineboard retry=0
|
||||||
ProxyPass /wssnineboard ws://nineboard/wssnineboard retry=0 keepalive=On
|
ProxyPass /wssnineboard ws://nineboard/wssnineboard retry=0 keepalive=On
|
||||||
ProxyPassReverse /wssnineboard ws://nineboard/wssnineboard retry=0
|
ProxyPassReverse /wssnineboard ws://nineboard/wssnineboard retry=0
|
||||||
|
|
||||||
|
# Ninegate
|
||||||
ProxyPass /ninegate http://ninegate/ninegate retry=0 keepalive=On
|
ProxyPass /ninegate http://ninegate/ninegate retry=0 keepalive=On
|
||||||
ProxyPassReverse /ninegate http://ninegate/ninegate retry=0
|
ProxyPassReverse /ninegate http://ninegate/ninegate retry=0
|
||||||
ProxyPass /wssninegate ws://ninegate/wssninegate retry=0 keepalive=On
|
ProxyPass /wssninegate ws://ninegate/wssninegate retry=0 keepalive=On
|
||||||
ProxyPassReverse /wssninegate ws://ninegate/wssninegate retry=0
|
ProxyPassReverse /wssninegate ws://ninegate/wssninegate retry=0
|
||||||
|
|
||||||
ProxyPass /wiki http://wiki retry=0 keepalive=On
|
# Nineskeletor
|
||||||
ProxyPassReverse /wiki http://wiki retry=0
|
ProxyPass /nineskeletor http://nineskeletor/nineskeletor retry=0 keepalive=On
|
||||||
|
ProxyPassReverse /nineskeletor http://nineskeletor/nineskeletor retry=0
|
||||||
|
|
||||||
|
# Dokuwiki
|
||||||
|
ProxyPass /dokuwiki http://dokuwiki retry=0 keepalive=On
|
||||||
|
ProxyPassReverse /dokuwiki http://dokuwiki retry=0
|
||||||
|
|
||||||
|
# Wordpress
|
||||||
ProxyPass /wordpress http://wordpress/wordpress retry=0 keepalive=On
|
ProxyPass /wordpress http://wordpress/wordpress retry=0 keepalive=On
|
||||||
ProxyPassReverse /wordpress http://wordpress/wordpress retry=0
|
ProxyPassReverse /wordpress http://wordpress/wordpress retry=0
|
||||||
|
|
||||||
# Services Développeur
|
# Adminer
|
||||||
ProxyPass /adminer http://adminer:8080 retry=0 keepalive=On
|
ProxyPass /adminer http://adminer:8080 retry=0 keepalive=On
|
||||||
ProxyPassReverse /adminer http://adminer:8080 retry=0
|
ProxyPassReverse /adminer http://adminer:8080 retry=0
|
||||||
|
|
||||||
|
# Phpldapadmin
|
||||||
ProxyPass /phpldapadmin http://phpldapadmin/phpldapadmin retry=0 keepalive=On
|
ProxyPass /phpldapadmin http://phpldapadmin/phpldapadmin retry=0 keepalive=On
|
||||||
ProxyPassReverse /phpldapadmin http://phpldapadmin/phpldapadmin retry=0
|
ProxyPassReverse /phpldapadmin http://phpldapadmin/phpldapadmin retry=0
|
||||||
|
|
||||||
# Page interne au proxy
|
# Page interne au proxy
|
||||||
DocumentRoot "/app/public"
|
DocumentRoot "/app/public"
|
||||||
<Directory "/app/public">
|
<Directory "/app/public">
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
|
@ -65,6 +80,5 @@ DocumentRoot "/app/public"
|
||||||
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||||
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
# Mariadb
|
||||||
|
# Base de données des services
|
||||||
|
# Port interne 3306
|
||||||
|
mariadb:
|
||||||
|
image: docker.io/library/mariadb
|
||||||
|
container_name: nine-mariadb
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: /nine/check.sh
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./services/15-mariadb/env/.env.merge
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./services/15-mariadb/volume/mysql:/var/lib/mysql
|
||||||
|
- ./services/15-mariadb/volume/nine:/nine
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function upmariadb {
|
||||||
|
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "MARIADB"
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice $MARIADB_SERVICE_NAME wait
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroymariadb(){
|
||||||
|
if [[ $MARIADB_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY $MARIADB_SERVICE_NAME"
|
||||||
|
|
||||||
|
stop $MARIADB_SERVICE_NAME 1
|
||||||
|
docker-compose rm -s -v -f "$MARIADB_SERVICE_NAME"
|
||||||
|
|
||||||
|
if [[ -z $1 ]]; then Question_ouinon "Souhaitez-vous supprimer l'ensemble des bases ?";fi
|
||||||
|
if [[ "$?" = 0 || -z $1 ]]
|
||||||
|
then
|
||||||
|
sudo rm -rf services/15-mariadb/volume/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
mariadb -u root -p$MARIADB_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $1;"
|
||||||
|
mariadb -u root -p$MARIADB_ROOT_PASSWORD -e "GRANT ALL PRIVILEGES ON $1.* TO '$MARIADB_USER'@'%';"
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
# Minio
|
||||||
|
# Stocakge S3
|
||||||
|
# Port interne 9000 pour le stockage / Port interne 9001 pour l'interface web
|
||||||
|
minio:
|
||||||
|
image: bitnami/minio
|
||||||
|
container_name: nine-minio
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./services/30-minio/env/.env.merge
|
||||||
|
ports:
|
||||||
|
- "9001:9001"
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- './services/30-minio/volume/data:/data'
|
|
@ -4,4 +4,10 @@
|
||||||
MINIO_ROOT_USER=${ADMIN_USER}
|
MINIO_ROOT_USER=${ADMIN_USER}
|
||||||
MINIO_ROOT_PASSWORD=${ADMIN_PASSWORD}
|
MINIO_ROOT_PASSWORD=${ADMIN_PASSWORD}
|
||||||
MINIO_DEFAULT_BUCKETS=nine
|
MINIO_DEFAULT_BUCKETS=nine
|
||||||
|
MINIO_API_PORT_NUMBER=9000
|
||||||
|
MINIO_CONSOLE_PORT_NUMBER=9001
|
||||||
|
|
||||||
|
#MINIO_SERVER_URL="${PROTOCOLE}://${WEB_URL}"
|
||||||
|
#MINIO_BROWSER_REDIRECT_URL="${MINIO_URL}"
|
||||||
|
#MINIO_SCHEME=${PROTOCOLE}
|
||||||
|
#BITNAMI_DEBUG=true
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function upminio {
|
||||||
|
if [[ $MINIO_ACTIVATE == 1 && $MINIO_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "MINIO"
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice $MINIO_SERVICE_NAME
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroyminio(){
|
||||||
|
if [[ $MINIO_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY $MINIO_SERVICE_NAME"
|
||||||
|
|
||||||
|
stop $MINIO_SERVICE_NAME 1
|
||||||
|
docker-compose rm -s -v -f "$MINIO_SERVICE_NAME"
|
||||||
|
|
||||||
|
if [[ -z $1 ]]; then Question_ouinon "Souhaitez-vous supprimer les fichiers stockés dans $MINIO_SERVICE_NAME ?";fi
|
||||||
|
if [[ "$?" = 0 || -z $1 ]]
|
||||||
|
then
|
||||||
|
sudo rm -rf ./services/30-minio/volume/data
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
# Openldap
|
||||||
|
# Annuaire
|
||||||
|
# Port interne 1389 & 1636
|
||||||
|
openldap:
|
||||||
|
image: docker.io/bitnami/openldap:2
|
||||||
|
container_name: nine-openldap
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: /nine/check.sh
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
env_file: ./services/30-openldap/env/.env.merge
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- './services/30-openldap/volume/data:/bitnami/openldap'
|
||||||
|
- './services/30-openldap/volume/nine:/nine'
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function upopenldap {
|
||||||
|
if [[ $OPENLDAP_ACTIVATE == 1 && $OPENLDAP_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title ${OPENLDAP_SERVICE_NAME^^}
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
|
||||||
|
mkdir -p ./services/30-openldap/volume/data
|
||||||
|
chmod a+wr ./services/30-openldap/volume/data
|
||||||
|
|
||||||
|
upservice $OPENLDAP_SERVICE_NAME wait
|
||||||
|
docker-compose exec $OPENLDAP_SERVICE_NAME /nine/init.sh
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroyopenldap {
|
||||||
|
if [[ $OPENLDAP_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY $OPENLDAP_SERVICE_NAME"
|
||||||
|
|
||||||
|
stop $OPENLDAP_SERVICE_NAME 1
|
||||||
|
docker-compose rm -s -v -f "$OPENLDAP_SERVICE_NAME"
|
||||||
|
|
||||||
|
if [[ -z $1 ]]; then Question_ouinon "Souhaitez-vous supprimer l'annuaire associé à $OPENLDAP_SERVICE_NAME ?";fi
|
||||||
|
if [[ "$?" = 0 || -z $1 ]]
|
||||||
|
then
|
||||||
|
sudo rm -rf ./services/30-openldap/volume/data
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
# Base de données redis pour les services qui souhaitent stocker leur session en bdd
|
||||||
|
# Port interne 6379
|
||||||
|
redis:
|
||||||
|
image: redis:4.0
|
||||||
|
container_name: nine-redis
|
||||||
|
env_file: ./services/30-redis/env/.env.merge
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Paris
|
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
# == REDIS ================================================================================================================================
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function upredis {
|
||||||
|
if [[ $REDIS_ACTIVATE == 1 && $REDIS_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "REDIS"
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice $REDIS_SERVICE_NAME
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroyredis(){
|
||||||
|
if [[ $REDIS_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY $REDIS_SERVICE_NAME"
|
||||||
|
|
||||||
|
stop $REDIS_SERVICE_NAME 1
|
||||||
|
docker-compose rm -s -v -f "$REDIS_SERVICE_NAME"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
# Ninegate
|
||||||
|
# Portail collaboratif
|
||||||
|
# Port interne 80
|
||||||
|
ninegate:
|
||||||
|
image: reg.cadoles.com/envole/ninegate
|
||||||
|
container_name: nine-ninegate
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./services/50-ninegate/env/.env.merge
|
||||||
|
networks:
|
||||||
|
- nine-network
|
||||||
|
volumes:
|
||||||
|
- ./services/50-ninegate/volume/data/private:/app/uploads
|
||||||
|
- ./services/50-ninegate/volume/data/public:/app/public/uploads
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
# == NINEGATE =============================================================================================================================
|
||||||
|
|
||||||
|
# BDD
|
||||||
|
DATABASE_NAME=${NINEGATE_SERVICE_NAME}
|
||||||
|
DATABASE_USER=${MARIADB_USER}
|
||||||
|
DATABASE_PASSWORD=${MARIADB_PASSWORD}
|
||||||
|
DATABASE_HOST=${MARIADB_SERVICE_NAME}
|
||||||
|
|
||||||
|
# Activation Widget
|
||||||
|
ACTIVATE_WIDADMINER=${ADMINER_ACTIVATE}
|
||||||
|
WIDADMINER_URL="${ADMINER_URL}"
|
||||||
|
|
||||||
|
ACTIVATE_WIDPHPLDAPADMIN=${PHPLDAPADMIN_ACTIVATE}
|
||||||
|
WIDPHPLDAPADMIN_URL=${PHPLDAPADMIN_URL}
|
||||||
|
|
||||||
|
ACTIVATE_WIDNEXTCLOUD=${NEXTCLOUD_ACTIVATE}
|
||||||
|
WIDNEXTCLOUD_URL=${NEXTCLOUD_URL}
|
||||||
|
|
||||||
|
ACTIVATE_WIDNINEBOARD=${NINEBOARD_ACTIVATE}
|
||||||
|
WIDNINEBOARD_URL=${NINEBOARD_URL}
|
||||||
|
|
||||||
|
ACTIVATE_WIDWORDPRESS=${WORDPRESS_ACTIVATE}
|
||||||
|
WIDWORDPRESS_URL=${WORDPRESS_URL}
|
||||||
|
|
||||||
|
INITPWDADMIN=${ADMIN_PASSWORD}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
function upninegate {
|
||||||
|
if [[ $NINEGATE_ACTIVATE == 1 && $NINEGATE_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title ${NINEGATE_SERVICE_NAME^^}
|
||||||
|
|
||||||
|
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
EchoVert "DATABASE"
|
||||||
|
Echo ${NINEGATE_SERVICE_NAME^^}
|
||||||
|
docker-compose exec $MARIADB_SERVICE_NAME /nine/init.sh $NINEGATE_SERVICE_NAME
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
EchoVert "CONTAINER"
|
||||||
|
upservice ${NINEGATE_SERVICE_NAME}
|
||||||
|
chmod -R a+wr ./services/50-ninegate/volume/data
|
||||||
|
Echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroyninegate {
|
||||||
|
if [[ $NINEGATE_LOCAL == 1 ]]
|
||||||
|
then
|
||||||
|
Title "DESTROY $NINEGATE_SERVICE_NAME"
|
||||||
|
|
||||||
|
stop $NINEGATE_SERVICE_NAME 1
|
||||||
|
docker-compose rm -s -v -f "$NINEGATE_SERVICE_NAME"
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $1 ]]; then Question_ouinon "Souhaitez-vous supprimer la BDD associé à $NINEGATE_SERVICE_NAME ?";fi
|
||||||
|
if [[ "$?" = 0 || -z $1 ]]
|
||||||
|
then
|
||||||
|
docker-compose exec $MARIADB_SERVICE_NAME /nine/delete.sh $NINEGATE_SERVICE_NAME
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |