├── README.md ├── bash ├── .img │ ├── ping-bad.png │ ├── ping-error.png │ └── ping-ok.png ├── getip-plugin.sh ├── getip.sh ├── install-agent-promtail.sh ├── install-all.sh └── sping.sh ├── debian ├── glpi │ ├── debian_install_glpi.sh │ └── docker-compose.yml ├── guacamole │ ├── debian_install_guacamole.sh │ └── docker-compose.yml ├── itop │ ├── debian_install_itop.sh │ └── docker-compose.yml ├── postinstall │ ├── addons │ │ └── adduser.sh │ ├── debian_postinstall.sh │ ├── motd_exemple │ └── ubuntu_postinstall.sh ├── wordpress │ ├── debian_install_wordpress.sh │ └── docker-compose.yml ├── zabbix-agent │ └── debian_install_zabbix_agent.sh ├── zabbix-proxy │ ├── debian_install_zabbix_proxy.sh │ └── docker-compose.yml └── zabbix-server │ ├── debian_install_zabbix_server.sh │ └── docker-compose.yml ├── docker-compose ├── bookstack │ └── docker-compose.yml ├── cachethq │ └── docker-compose.yml ├── filebrowser │ └── docker-compose.yml ├── flood-torrent │ └── docker-compose.yml ├── jellyfin │ └── docker-compose.yml ├── nextcloud │ └── docker-compose.yml ├── odoo │ └── docker-compose.yml ├── organizr │ └── docker-compose.yml ├── owncloud │ └── docker-compose.yml ├── plex-tools │ └── docker-compose.yml ├── plex │ └── docker-compose.yml ├── portainer │ └── docker-compose.yml ├── rutorrent │ └── docker-compose.yml ├── seafile │ └── docker-compose.yml ├── teamspeak │ └── docker-compose.yml ├── traefik │ └── docker-compose.yml ├── vscode │ └── docker-compose.yml ├── website-html │ └── docker-compose.yml └── website-wordpress │ └── docker-compose.yml └── powershell ├── excel_to_csv.ps1 └── office365_adduser.ps1 /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Scripts by PAPAMICA 3 | | ![PAPAMICA](https://zupimages.net/up/20/04/7vtd.png) | [Labo-Tech.fr](https://labo-tech.fr/)
[Tech2Tech.fr](https://www.tech2tech.fr/)
[Twitter @PAPAMICA__](https://twitter.com/PAPAMICA__)
[LinkedIn](https://www.linkedin.com/in/mickael-asseline/)
| 4 | |:--------:| :-------------| 5 | 6 | ## ATTENTION : Les scripts sont prévu pour l'utilisateur root ! Veuillez utiliser l'utilisateur root pour toutes les manipulations (et télécharger ce git dans le dossier /root/ de votre serveur) 7 | 8 | ### Fonctionnalités 9 | 10 | - Déployez plusieurs solutions en 4 commandes : Zabbix Serveur, Zabbix Agent, Zabbix Proxy, iTop, Guacamole, et bien plus ! 11 | - Une grande partie des scripts utilisent Docker à jours avec des images à jours afin de disposer des dernières fonctionnalités. 12 | - Les scripts fonctionnent sous différentes distributions (en fonction des dossiers). 13 | 14 | # Debian 15 | 16 | ### Utilisation 17 | Installation de Git : 18 | ```bash 19 | apt install -y git 20 | ``` 21 | 22 | Récupération des scripts : 23 | ```bash 24 | git clone https://github.com/PAPAMICA/scripts 25 | ``` 26 | 27 | 28 | Exécuter un script : 29 | ```bash 30 | cd scripts/debian/script_folder 31 | chmod +x name_of_script.sh 32 | ./name_of_scripts.sh 33 | ``` 34 | 35 | ### Liste des scripts 36 | 37 | + **Préparation VPS/VM** : debian_postinstall.sh (voir en dessous) 38 | + **Guacamole (Docker)** : debian_install_guacamole.sh 39 | + **iTop (Docker)** : debian_install_itop.sh 40 | + **Zabbix** 41 | + **Zabbix-Server (Docker)** : debian_install_zabbix_server.sh 42 | + **Zabbix-Proxy (Docker)** : debian_install_zabbix_proxy.sh 43 | + **Zabbix-Agent** : debian_install_zabbix_agent.sh 44 | + **WordPress (Docker test)** : debian_install_wordpress.sh 45 | + **GLPI (Docker)** : debian_install_glpi.sh 46 | 47 | Et bien plus sont à venir ! 48 | 49 | ### Script debian_postinstall.sh 50 | Le script est compatible avec Debian 8/9/10 x64. 51 | Le script doit être executé via l'utilisateur root. 52 | Voici les actions effectuées : 53 | + Configuration des sources 54 | + Mise à jour du serveur 55 | + Installation des paquets essentiels (sudo, openssh-server, cockpit, locate, curl) 56 | + Installation et configuration de ZSH et OhMyZsh 57 | + Changement du mot de passe Root 58 | + Création d'un utilisateur et ajout au groupe sudo 59 | + Changement du MOTD 60 | + Installation de Docker 61 | + Installation et configuration de Traefik et de Portainer 62 | 63 | # Docker-compose 64 | Les dockers-compose sont tous en version 2 et fonctionnent avec Portainer. 65 | Dans chaque docker-compose, les labels et le network (proxy) sont préconfigurer pour fonctionner avec Traefik. 66 | 67 | Ces docker-compose sont adapté à mes besoins, n'hésitez pas à les modifiers pour votre utilisation. 68 | Un bon moyen de vérifier les paramètres disponibles chaque image reste la petite recherche Google avec le nom de l'image ;) 69 | 70 | ### Utilisation 71 | Installer Docker et Docker-compose. 72 | 73 | Récupération des scripts : 74 | ```bash 75 | git clone https://github.com/PAPAMICA/scripts 76 | ``` 77 | 78 | 79 | Lancer un docker-compose : 80 | ```bash 81 | cd scripts/docker-compose/service_folder 82 | docker-compose up -d 83 | ``` 84 | 85 | ### Liste des docker-compose : 86 | 87 | + **Traefik** 88 | + **Portainer** 89 | + **Bookstack** 90 | + **CachetHQ** (avec Cachet-Zabbix) 91 | + **FileBrowser** 92 | + **FloodTorrent** 93 | + **Jellyfin** 94 | + **NextCloud** (avec redis) 95 | + **Odoo** 96 | + **Organizr** 97 | + **OwnCloud** (avec redis) 98 | + **Plex-Tools** (Varken, Radarr, Sonarr, Grafana, etc...) 99 | + **Plex** 100 | + **RuTorrent** 101 | + **Seafile** 102 | + **TeamSpeak** (avec SinusBot et TS3Viewer) 103 | + **VSCode** 104 | + **Website-HTML** 105 | + **Website-Wordpress** 106 | 107 | Et bien plus sont à venir ! 108 | 109 | ## Quelques commandes utiles : 110 | 111 | Vu le nombre de personnes qui m’ont contacté suite aux précédents articles sur Tech2Tech.fr et Labo-Tech.fr pour des commandes simples, voici celles que l’on m’a le plus demandées : 112 | 113 | - **docker container ls** : Afficher les containers Docker en cours 114 | - **docker-compose stop** : Arrêter les containers créés avec le scripts (dans le dossier du script) 115 | - **docker-compose up -d** : Lancer les containers créés avec le scripts (dans le dossier du script) 116 | - **docker logs ** : Afficher les logs du container 117 | - **docker exec -it bash** : Entrer dans le container 118 | 119 | Pour le reste des commandes, je vous invite à vous référer à mon article sur Labo-Tech : [Quelles sont les commandes de base de Docker ?](https://labo-tech.fr/base-de-connaissance/quelles-sont-les-commandes-de-base-de-docker/) 120 | -------------------------------------------------------------------------------- /bash/.img/ping-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAPAMICA/scripts/c1427d0cc97476a52dc582525daa31c3965fc76e/bash/.img/ping-bad.png -------------------------------------------------------------------------------- /bash/.img/ping-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAPAMICA/scripts/c1427d0cc97476a52dc582525daa31c3965fc76e/bash/.img/ping-error.png -------------------------------------------------------------------------------- /bash/.img/ping-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAPAMICA/scripts/c1427d0cc97476a52dc582525daa31c3965fc76e/bash/.img/ping-ok.png -------------------------------------------------------------------------------- /bash/getip-plugin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Text to display 4 | # Path to the image to display 5 | # Tooltip text 6 | # Pourcentage to display in the bar 7 | # The command to be executed when clicking on the image 8 | # The command to be executed when clicking on the text 9 | 10 | 11 | network=$(nmcli con show --active) 12 | if [ "$network" = "" ]; then 13 | echo "/home/papamica/.img/ping-error.png" 14 | tf="CHECK NETWORK" 15 | color="Red" 16 | echo ""$tf"" 17 | exit 18 | fi 19 | 20 | interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}') 21 | 22 | if [ $interface != "unreachable" ]; then 23 | ipadress=$(ifconfig "$interface" | awk '/inet /{ print $2;}') 24 | if [ "$ipadress" != "$ipadressbak" ]; then 25 | gateway=$(nmcli dev show $interface |grep IP4.GATEWAY | awk '{print $2 }') 26 | mask=$(ifconfig "$interface" | awk '/netmask/{ print $4;}') 27 | dns=$(nmcli dev show $interface | grep DNS | awk '{if(NR==1) print $2}') 28 | dns2=$(nmcli dev show $interface |grep DNS | awk '{if(NR==2) print $2}') 29 | domain=$(nmcli dev show $interface | grep DOMAIN | sed 's/\s\s*/\t/g' | cut -f 2) 30 | mac=$(cat /sys/class/net/$interface/address) 31 | nom=$(nmcli dev show $interface |grep GENERAL.CONNECTION | awk '{print $2 " " $3 " " $4 " " $5 " " $6}') 32 | mtu=$(cat /sys/class/net/$interface/mtu) 33 | rxerror=$(cat /sys/class/net/$interface/statistics/rx_errors) 34 | txerror=$(cat /sys/class/net/$interface/statistics/tx_errors) 35 | rxdropped=$(cat /sys/class/net/$interface/statistics/rx_dropped) 36 | txdropped=$(cat /sys/class/net/$interface/statistics/tx_dropped) 37 | wan=$(curl -s ifconfig.io) 38 | ipadressbak=$ipadress 39 | fi 40 | 41 | 42 | # Vérification de la connexion à Internet via IP 43 | t="0" 44 | t="$(ping -c 1 -W 1 8.8.8.8 | tail -1| awk -F '/' '{print $5}')" 45 | if [ -z "$t" ]; then 46 | echo "/home/papamica/.img/ping-error.png" 47 | #echo " ERROR" 48 | color="Red" 49 | tf="ERROR" 50 | fi 51 | 52 | if [ -n "$t" ]; then 53 | t=${t%.*} 54 | ((t++)) 55 | if [ "$t" -eq 1 ]; then 56 | echo "/home/papamica/.img/ping-ok.png" 57 | #echo " <"$t" ms" 58 | tf="<$t ms" 59 | color="Green" 60 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 61 | echo "/home/papamica/.img/ping-ok.png" 62 | #echo " "$t" ms" 63 | color="Green" 64 | tf="$t ms" 65 | elif [ "$t" -gt 100 ] && [ "$t" -le 500 ]; then 66 | echo "/home/papamica/.img/ping-bad.png" 67 | #echo " "$t" ms" 68 | color="Yellow" 69 | tf="$t ms" 70 | else 71 | echo "/home/papamica/.img/ping-error.png" 72 | #echo " "$t" ms" 73 | color="Red" 74 | tf="$t ms" 75 | fi 76 | fi 77 | else 78 | echo "/home/papamica/.img/ping-error.png" 79 | tf="CHECK IP" 80 | color="Red" 81 | echo ""$tf"" 82 | exit 83 | fi 84 | echo " 85 | PING : "$tf" 86 | 87 | LAN IP Address : "$ipadress" 88 | Gateway : "$gateway" 89 | Mask : "$mask" 90 | 91 | DNS Server : "$dns" 92 | 93 | Interface : "$interface" 94 | Name : "$nom" 95 | MAC Address : "$mac" 96 | MTU : "$mtu" 97 | Domain : "$domain" 98 | 99 | WAN IP Address : "$wan"" 100 | -------------------------------------------------------------------------------- /bash/getip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Getip by Mickael Asseline (PAPAMICA) 4 | 5 | # A simple script to improve the display of certain essential information. 6 | 7 | # Use : 8 | # Make the script executable with "chmod +x getip.sh" 9 | # Execute it with "./getip.sh" 10 | 11 | # The "-s" parameter is used to launch a speedtest. (Require speedtest-cli) 12 | 13 | # You can add an alias to launch it with a simple command. 14 | 15 | if [[ $1 =~ "h" ]]; then 16 | echo "" 17 | tput setaf 7; echo "________________________________________________________________________________" 18 | echo "" 19 | echo " Bash script to improve the reading of network informations " 20 | echo " created by Mickael Asseline (PAPAMICA) " 21 | echo "" 22 | echo " Options availables :" 23 | echo " -s Launch a speedtest (require speedtest-cli)" 24 | echo " -i Allows the choice of the interface to display" 25 | echo " -r Change the default route by the chosen interface" 26 | echo " (For speedtest and pings tests)" 27 | echo " -h Diplay this help" 28 | echo "" 29 | echo " Use :" 30 | echo " getip IP informations" 31 | echo " getip -s IP informations + Speedtest" 32 | echo " getip -i IP informations + Choice interface" 33 | echo " getip -ir IP informations + Choice interface + Change route" 34 | echo " getip -sir IP informations + Choice interface + Change route + Speedtest" 35 | echo 36 | exit 37 | fi 38 | 39 | 40 | network=$(nmcli con show --active) 41 | if [ "$network" = "" ]; then 42 | tput setaf 1; echo "No active interface !" 43 | exit 44 | fi 45 | 46 | interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}') 47 | if [ $interface != "unreachable" ]; then 48 | 49 | if [[ $1 =~ "i" ]]; then 50 | int1=$(nmcli con show --active | awk '{if(NR==2) print $(NF-1)}') 51 | intname1=$(nmcli con show --active | awk '{if(NR==2) print $NF}') 52 | int2=$(nmcli con show --active | awk '{if(NR==3) print $(NF-1)}') 53 | intname2=$(nmcli con show --active | awk '{if(NR==3) print $NF}') 54 | int3=$(nmcli con show --active | awk '{if(NR==4) print $(NF-1)}') 55 | intname3=$(nmcli con show --active | awk '{if(NR==4) print $NF}') 56 | int4=$(nmcli con show --active | awk '{if(NR==5) print $(NF-1)}') 57 | intname4=$(nmcli con show --active | awk '{if(NR==5) print $NF}') 58 | int5=$(nmcli con show --active | awk '{if(NR==6) print $(NF-1)}') 59 | intname5=$(nmcli con show --active | awk '{if(NR==6) print $NF}') 60 | int6=$(nmcli con show --active | awk '{if(NR==7) print $(NF-1)}') 61 | intname6=$(nmcli con show --active | awk '{if(NR==7) print $NF}') 62 | int7=$(nmcli con show --active | awk '{if(NR==8) print $(NF-1)}') 63 | intname7=$(nmcli con show --active | awk '{if(NR==8) print $NF}') 64 | int8=$(nmcli con show --active | awk '{if(NR==9) print $(NF-1)}') 65 | intname8=$(nmcli con show --active | awk '{if(NR==9) print $NF}') 66 | int9=$(nmcli con show --active | awk '{if(NR==10) print $(NF-1)}') 67 | intname10=$(nmcli con show --active | awk '{if(NR==10) print $NF}') 68 | 69 | tput setaf 7; echo "________________________________________________" 70 | echo "" 71 | #echo "Liste des interfaces :" 72 | io=0 73 | if [ -n $int1 ]; then 74 | echo " 1 - $int1 ($intname1)" 75 | ((io++)) 76 | fi 77 | if [ "$int2" != "" ]; then 78 | echo " 2 - $int2 ($intname2)" 79 | ((io++)) 80 | fi 81 | if [ "$int3" != "" ]; then 82 | echo " 3 - $int3 ($intname3)" 83 | ((io++)) 84 | fi 85 | if [ "$int4" != "" ]; then 86 | echo " 4 - $int4 ($intname4)" 87 | ((io++)) 88 | fi 89 | if [ "$int5" != "" ]; then 90 | echo " 5 - $int5 ($intname5)" 91 | ((io++)) 92 | fi 93 | if [ "$int6" != "" ]; then 94 | echo " 6 - $int6 ($intname6)" 95 | ((io++)) 96 | fi 97 | if [ "$int7" != "" ]; then 98 | echo " 7 - $int7 ($intname7)" 99 | ((io++)) 100 | fi 101 | if [ "$int8" != "" ]; then 102 | echo " 8 - $int8 ($intname8)" 103 | ((io++)) 104 | fi 105 | if [ "$int9" != "" ]; then 106 | echo " 9 - $int9 ($intname9)" 107 | ((io++)) 108 | fi 109 | echo "" 110 | read -p " Choice interface (1-$io) : " intchoix 111 | 112 | if [ "$intchoix" -lt 1 ] && [ "$intchoix" -gt $io ]; then 113 | echo " Error : choice interface !" 114 | exit 115 | fi 116 | if [ "$intchoix" = 1 ]; then 117 | interface=$intname1 118 | fi 119 | if [ "$intchoix" = 2 ]; then 120 | interface=$intname2 121 | fi 122 | if [ "$intchoix" = 3 ]; then 123 | interface=$intname3 124 | fi 125 | if [ "$intchoix" = 4 ]; then 126 | interface=$intname4 127 | fi 128 | if [ "$intchoix" = 5 ]; then 129 | interface=$intname5 130 | fi 131 | if [ "$intchoix" = 6 ]; then 132 | interface=$intname6 133 | fi 134 | if [ "$intchoix" = 7 ]; then 135 | interface=$intname7 136 | fi 137 | if [ "$intchoix" = 8 ]; then 138 | interface=$intname8 139 | fi 140 | if [ "$intchoix" = 9 ]; then 141 | interface=$intname9 142 | fi 143 | 144 | fi 145 | 146 | if [[ $1 =~ "r" ]]; then 147 | gateway=$(nmcli dev show $interface |grep IP4.GATEWAY | awk '{print $2 }') 148 | echo "" 149 | tput setaf 3; echo " Requires root rights." 150 | sudo route del default 151 | sudo route add default gw $gateway $interface 152 | tput setaf 2; echo " The default route has been changed to pass to $interface" 153 | fi 154 | 155 | 156 | 157 | # Récuparation des informations 158 | ipadress=$(ifconfig "$interface" | awk '/inet /{ print $2;}') 159 | gateway=$(nmcli dev show $interface |grep IP4.GATEWAY | awk '{print $2 }') 160 | mask=$(ifconfig "$interface" | awk '/netmask/{ print $4;}') 161 | dns=$(nmcli dev show $interface | grep DNS | awk '{if(NR==1) print $2}') 162 | dns2=$(nmcli dev show $interface |grep DNS | awk '{if(NR==2) print $2}') 163 | domain=$(nmcli dev show $interface | grep DOMAIN | sed 's/\s\s*/\t/g' | cut -f 2) 164 | mac=$(cat /sys/class/net/$interface/address) 165 | nom=$(nmcli dev show $interface |grep GENERAL.CONNECTION | awk '{print $2 " " $3 " " $4 " " $5 " " $6}') 166 | mtu=$(cat /sys/class/net/$interface/mtu) 167 | rxerror=$(cat /sys/class/net/$interface/statistics/rx_errors) 168 | txerror=$(cat /sys/class/net/$interface/statistics/tx_errors) 169 | rxdropped=$(cat /sys/class/net/$interface/statistics/rx_dropped) 170 | txdropped=$(cat /sys/class/net/$interface/statistics/tx_dropped) 171 | 172 | 173 | 174 | 175 | # Affichage des informations 176 | tput setaf 7; echo "________________________________________________" 177 | echo "" 178 | echo " LAN IP Address : $ipadress" 179 | echo " Gateway : $gateway" 180 | echo " Mask : $mask" 181 | echo "" 182 | echo " DNS Server : $dns" 183 | if [ -n $dns2 ]; then 184 | echo " DNS Server 2 : $dns2" 185 | fi 186 | echo " Interface : $interface" 187 | echo " Name : $nom" 188 | echo " MAC Address : $mac" 189 | echo " MTU : $mtu" 190 | echo " Domain : $domain" 191 | 192 | ping="$(ping -c 1 -W 1 google.fr | tail -1| awk -F '/' '{print $5}')" 193 | if [ "$ping" != 0 ]; then 194 | wan=$(curl -s ifconfig.io) 195 | fi 196 | 197 | echo " WAN IP Address : $wan" 198 | tput setaf 7; echo "________________________________________________" 199 | echo "" 200 | echo " RX : $rxerror errors / $rxdropped dropped" 201 | echo " TX : $txerror errors / $txdropped dropped" 202 | echo "" 203 | 204 | # Vérification de la connexion à Internet via IP 205 | t="0" 206 | t="$(ping -c 1 -W 1 8.8.8.8 | tail -1| awk -F '/' '{print $5}')" 207 | if [ -z "$t" ]; then 208 | tput setaf 1; echo " INTERNET IP : ERROR" 209 | fi 210 | 211 | if [ -n "$t" ]; then 212 | t=${t%.*} 213 | ((t++)) 214 | if [ "$t" -eq 1 ]; then 215 | tput setaf 2; echo " INTERNET IP : OK => <$t ms" 216 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 217 | tput setaf 2; echo " INTERNET IP : OK => $t ms" 218 | else 219 | tput setaf 3; echo " INTERNET IP : BAD => $t ms" 220 | fi 221 | fi 222 | 223 | 224 | # Vérification de la connexion à Internet via DNS 225 | t="0" 226 | t="$(ping -c 1 -W 1 google.fr | tail -1| awk -F '/' '{print $5}')" 227 | if [ -z "$t" ]; then 228 | tput setaf 1; echo " INTERNET DNS : ERROR" 229 | fi 230 | 231 | if [ -n "$t" ]; then 232 | t=${t%.*} 233 | ((t++)) 234 | if [ "$t" -eq 1 ]; then 235 | tput setaf 2; echo " INTERNET DNS : OK => <$t ms" 236 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 237 | tput setaf 2; echo " INTERNET DNS : OK => $t ms" 238 | else 239 | tput setaf 3; echo " INTERNET DNS : BAD => $t ms" 240 | fi 241 | fi 242 | 243 | # Vérification de la connexion à la passerelle 244 | t="0" 245 | t="$(ping -c 1 -W 1 $gateway | tail -1| awk -F '/' '{print $5}')" 246 | if [ -z "$t" ]; then 247 | tput setaf 1; echo " GATEWAY : ERROR" 248 | fi 249 | 250 | if [ -n "$t" ]; then 251 | t=${t%.*} 252 | ((t++)) 253 | if [ "$t" -eq 1 ]; then 254 | tput setaf 2; echo " GATEWAY : OK => <$t ms" 255 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 256 | tput setaf 2; echo " GATEWAY : OK => $t ms" 257 | else 258 | tput setaf 3; echo " GATEWAY : BAD => $t ms" 259 | fi 260 | fi 261 | 262 | # Vérification de la connexion au serveur DNS 263 | t="0" 264 | t="$(ping -c 1 -W 1 $dns | tail -1| awk -F '/' '{print $5}')" 265 | if [ -z "$t" ]; then 266 | tput setaf 1; echo " DNS SERVER : ERROR" 267 | fi 268 | 269 | if [ -n "$t" ]; then 270 | t=${t%.*} 271 | ((t++)) 272 | if [ "$t" -eq 1 ]; then 273 | tput setaf 2; echo " DNS SERVER : OK => <$t ms" 274 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 275 | tput setaf 2; echo " DNS SERVER : OK => $t ms" 276 | else 277 | tput setaf 3; echo " DNS SERVER : BAD => $t ms" 278 | fi 279 | fi 280 | 281 | tput setaf 7; echo "________________________________________________" 282 | 283 | # Si -s est présent, lancement du Speedtest 284 | if [ -z $1 ]; then 285 | exit 286 | fi 287 | 288 | if [[ $1 =~ "s" ]]; then 289 | echo "" 290 | speedtest > temp.txt 291 | ping=$(grep "Hosted" "temp.txt" | awk '{print $(NF-1)}') 292 | upload=$(grep "Upload" "temp.txt" | awk '{print $2}') 293 | download=$(grep "Download" "temp.txt" | awk '{print $2}') 294 | fai=$(grep "Testing from" "temp.txt" | awk '{print $3}') 295 | rm temp.txt 296 | 297 | echo " FAI : $fai" 298 | 299 | ping=${ping%.*} 300 | if [ "$ping" -eq 0 ]; then 301 | tput setaf 1; echo " PING : ERROR" 302 | elif [ "$ping" -gt 0 ] && [ "$ping" -le 100 ]; then 303 | tput setaf 2; echo " PING : OK => $ping ms" 304 | else 305 | tput setaf 3; echo " PING : BAD => $ping ms" 306 | fi 307 | 308 | download=${download%.*} 309 | if [ "$download" -eq 0 ];then 310 | tput setaf 1; echo " DOWNLOAD : ERROR" 311 | elif [ "$download" -gt 0 ] && [ "$download" -le 2 ]; then 312 | tput setaf 1; echo " DOWNLOAD : BAD => $download Mbit/s" 313 | elif [ "$download" -gt 2 ] && [ "$download" -le 20 ]; then 314 | tput setaf 3; echo " DOWNLOAD : OK => $download Mbit/s" 315 | else 316 | tput setaf 2; echo " DOWNLOAD : GOOD => $download Mbit/s" 317 | fi 318 | 319 | upload=${upload%.*} 320 | if [ "$upload" -eq 0 ];then 321 | tput setaf 1; echo " UPLOAD : ERROR" 322 | elif [ "$upload" -gt 0 ] && [ "$upload" -le 2 ]; then 323 | tput setaf 1; echo " UPLOAD : BAD => $upload Mbit/s" 324 | elif [ "$upload" -gt 2 ] && [ "$upload" -le 20 ]; then 325 | tput setaf 3; echo " UPLOAD : OK => $upload Mbit/s" 326 | else 327 | tput setaf 2; echo " UPLOAD : GOOD => $upload Mbit/s" 328 | fi 329 | tput setaf 7; echo "________________________________________________" 330 | fi 331 | 332 | if [[ $1 =~ "r" ]]; then 333 | echo "" 334 | tput setaf 3; read -p " Reset the default route? (y/n) : " dellroute 335 | if [[ "$dellroute" = "y" ]]; then 336 | sudo route del default 337 | sudo systemctl restart NetworkManager 338 | fi 339 | tput setaf 2; echo " Default route reset." 340 | fi 341 | else 342 | tput setaf 1; echo " NO IP" 343 | exit 344 | fi -------------------------------------------------------------------------------- /bash/install-agent-promtail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # http://grafana.ndd:3100/loki/api/v1/push 4 | urlserver= 5 | host=$(hostname) 6 | 7 | cd /bin 8 | curl -fSL -o promtail.gz "https://github.com/grafana/loki/releases/download/v1.6.1/promtail-linux-amd64.zip" 9 | gunzip promtail.gz 10 | chmod a+x promtail 11 | 12 | cd /etc 13 | mkdir promtail 14 | cd promtail 15 | 16 | echo "server: 17 | http_listen_port: 9080 18 | grpc_listen_port: 0 19 | 20 | positions: 21 | filename: /tmp/positions.yaml 22 | 23 | clients: 24 | - url: $urlserver 25 | 26 | scrape_configs: 27 | - job_name: journal 28 | journal: 29 | max_age: 12h 30 | labels: 31 | host: \"$host\" 32 | job: systemd-journal 33 | service: systemd-journal 34 | relabel_configs: 35 | - source_labels: ['__journal__systemd_unit'] 36 | target_label: 'unit' 37 | 38 | - job_name: varlog 39 | static_configs: 40 | - targets: 41 | - localhost 42 | labels: 43 | host: \"$host\" 44 | job: varlogs 45 | service: system 46 | __path__: /var/log/*log 47 | " > config-promtail.yml 48 | 49 | useradd --system promtail 50 | echo "[Unit] 51 | Description=Promtail service 52 | After=network.target 53 | 54 | [Service] 55 | Type=simple 56 | User=promtail 57 | ExecStart=/bin/promtail -config.file /etc/promtail/config-promtail.yml 58 | 59 | [Install] 60 | WantedBy=multi-user.target 61 | " > /etc/systemd/system/promtail.service 62 | 63 | systemctl enable promtail.service 64 | systemctl start promtail 65 | systemctl status promtail 66 | -------------------------------------------------------------------------------- /bash/install-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script d'installation de mes scripts getip et sping avec alias. 4 | # Par Mickael Asseline (PAPAMICA) 5 | # Compatibles avec toutes les distributions 6 | # Compatible avec Bash et Zsh 7 | 8 | echo "" 9 | tput setaf 2; echo "Installation of dependencies" 10 | tput setaf 7; echo "" 11 | 12 | packagesNeeded='speedtest-cli network-manager' 13 | if [ -x "$(command -v apk)" ]; then 14 | sudo apk add -y --no-cache $packagesNeeded 15 | tput setaf 2; echo "$packagesNeeded installed." 16 | elif [ -x "$(command -v apt-get)" ]; then 17 | sudo apt-get install -y $packagesNeeded 18 | tput setaf 2; echo "$packagesNeeded installed." 19 | elif [ -x "$(command -v dnf)" ]; then 20 | sudo dnf install -y $packagesNeeded 21 | tput setaf 2; echo "$packagesNeeded installed." 22 | elif [ -x "$(command -v zypper)" ]; then 23 | sudo zypper install -y $packagesNeeded 24 | tput setaf 2; echo "$packagesNeeded installed." 25 | elif [ -x "$(command -v pacman)" ]; then 26 | sudo pacman -S --noconfirm $packagesNeeded 27 | tput setaf 2; echo "$packagesNeeded installed." 28 | else 29 | tput setaf 1; echo "FAILED TO INSTALL PACKAGE: Package manager not found. You must manually install: $packagesNeeded">&2; 30 | fi 31 | $DESKTOP_SESSION 32 | 33 | tput setaf 7; echo "" 34 | # Copie des scripts dans le dossier utilisateur 35 | cp getip.sh ~/.getip.sh 36 | chmod +x ~/.getip.sh 37 | 38 | cp sping.sh ~/.sping.sh 39 | chmod +x ~/.sping.sh 40 | 41 | 42 | echo "" 43 | tput setaf 2; echo "Current User : $USER" 44 | tput setaf 2; echo "Current Shell : $SHELL" 45 | tput setaf 2; echo "Current Desktop Session : $DESKTOP_SESSION" 46 | tput setaf 7; echo "" 47 | if [[ $SHELL =~ "zsh" ]]; then 48 | echo "alias getip=\"~/.getip.sh\"" >> ~/.zshrc 49 | echo "alias sping=\"~/.sping.sh\"" >> ~/.zshrc 50 | else 51 | echo "alias getip=\"~/.getip.sh\"" >> ~/.bashrc 52 | echo "alias sping=\"~/.sping.sh\"" >> ~/.bashrc 53 | fi 54 | 55 | tput setaf 2; echo "" 56 | tput setaf 2; echo "Installation complete" 57 | tput setaf 2; echo "Installation complete" 58 | tput setaf 2; echo "After reconnect, you can use this commands : " 59 | tput setaf 2; echo " - getip" 60 | tput setaf 2; echo " - sping" -------------------------------------------------------------------------------- /bash/sping.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ip=8.8.8.8 3 | temps=1 4 | 5 | if [ "$1" != "" ]; then 6 | ip=$1 7 | fi 8 | 9 | if [ "$2" != "" ]; then 10 | temps=$2 11 | fi 12 | 13 | 14 | while sleep $temps; do 15 | t="0" 16 | t="$(ping -c 1 $ip | tail -1| awk -F '/' '{print $5}')" 17 | if [ -z "$t" ]; then 18 | tput setaf 1; echo "ERROR" 19 | fi 20 | 21 | if [ -n "$t" ]; then 22 | t=${t%.*} 23 | ((t++)) 24 | if [ "$t" -eq 1 ]; then 25 | tput setaf 2; echo "OK => <$t ms" 26 | elif [ "$t" -gt 1 ] && [ "$t" -le 100 ]; then 27 | tput setaf 2; echo "OK => $t ms" 28 | else 29 | tput setaf 3; echo "BAD => $t ms" 30 | fi 31 | fi 32 | done -------------------------------------------------------------------------------- /debian/glpi/debian_install_glpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | SERVER_IP=$(hostname -i) 4 | # Installation des dépendances et de docker 5 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 6 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 7 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 8 | apt-get update 9 | apt-get -y install docker-ce docker-compose 10 | systemctl enable docker 11 | systemctl start docker 12 | 13 | #Lancement du docker-compose.yml 14 | docker-compose up -d 15 | 16 | clear 17 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 18 | tput setaf 3; echo "" 19 | docker container ls 20 | echo "" 21 | tput setaf 7; echo "--------------------------------------------------" 22 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <= " 23 | tput setaf 7; echo "" 24 | tput setaf 7; echo " Lien : $SERVER_IP:80 " 25 | tput setaf 7; echo "" 26 | tput bold; tput setaf 6; echo " By PAPAMICA " 27 | tput bold; tput setaf 6; echo " Labo-Tech.fr " 28 | tput setaf 7; echo "--------------------------------------------------" 29 | tput setaf 2; echo "" 30 | 31 | -------------------------------------------------------------------------------- /debian/glpi/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.2" 2 | 3 | services: 4 | #Mysql Container 5 | mysql: 6 | image: mysql:5.7.23 7 | container_name: mysql 8 | hostname: mysql 9 | volumes: 10 | - /var/lib/mysql:/var/lib/mysql 11 | environment: 12 | - MYSQL_ROOT_PASSWORD=glpi_root 13 | - MYSQL_DATABASE=glpidb 14 | - MYSQL_USER=glpi_user 15 | - MYSQL_PASSWORD=glpi 16 | restart: always 17 | 18 | #GLPI Container 19 | glpi: 20 | image: diouxx/glpi 21 | container_name : glpi 22 | hostname: glpi 23 | ports: 24 | - "80:80" 25 | volumes: 26 | - /etc/timezone:/etc/timezone:ro 27 | - /etc/localtime:/etc/localtime:ro 28 | - /var/www/html/glpi/:/var/www/html/glpi 29 | environment: 30 | - TIMEZONE=Europe/Paris 31 | restart: always -------------------------------------------------------------------------------- /debian/guacamole/debian_install_guacamole.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | SERVER_IP=$(hostname -i) 4 | # Installation des dépendances et de docker 5 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 6 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 7 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 8 | apt-get update 9 | apt-get -y install docker-ce docker-compose 10 | systemctl enable docker 11 | systemctl start docker 12 | 13 | #Lancement du docker-compose.yml 14 | docker-compose up -d 15 | 16 | clear 17 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 18 | tput setaf 3; echo "" 19 | docker container ls 20 | echo "" 21 | tput setaf 7; echo "--------------------------------------------------" 22 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <= " 23 | tput setaf 7; echo "" 24 | tput setaf 7; echo " Lien : $SERVER_IP:8080 " 25 | tput setaf 7; echo " Identifiant : guacadmin | MDP : guacadmin " 26 | tput setaf 7; echo "" 27 | tput bold; tput setaf 6; echo " By PAPAMICA " 28 | tput bold; tput setaf 6; echo " wiki-tech.io " 29 | tput setaf 7; echo "--------------------------------------------------" 30 | tput setaf 2; echo "" 31 | 32 | -------------------------------------------------------------------------------- /debian/guacamole/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | guacamole: 4 | image: oznu/guacamole 5 | container_name: guacamole 6 | ports: 7 | - 8080:8080 8 | restart: always -------------------------------------------------------------------------------- /debian/itop/debian_install_itop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | SERVER_IP=$(hostname -i) 4 | # Installation des dépendances et de docker 5 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 6 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 7 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 8 | apt-get update 9 | apt-get -y install docker-ce docker-compose 10 | systemctl enable docker 11 | systemctl start docker 12 | 13 | #Lancement du docker-compose.yml 14 | docker-compose up -d 15 | 16 | clear 17 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 18 | tput setaf 3; echo "" 19 | docker container ls 20 | echo "" 21 | tput setaf 7; echo "--------------------------------------------------" 22 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <= " 23 | tput setaf 7; echo "" 24 | tput setaf 7; echo " Lien : $SERVER_IP:8000 " 25 | tput setaf 7; echo " Configuration de la base de données : " 26 | tput setaf 7; echo " Server Name : localhost " 27 | tput setaf 7; echo " Login : root " 28 | tput setaf 7; echo " Pas de mot de passe " 29 | tput setaf 7; echo "" 30 | tput bold; tput setaf 6; echo " By PAPAMICA " 31 | tput bold; tput setaf 6; echo " Labo-Tech.fr " 32 | tput setaf 7; echo "--------------------------------------------------" 33 | tput setaf 2; echo "" 34 | 35 | -------------------------------------------------------------------------------- /debian/itop/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | itop: 4 | image: vbkunin/itop 5 | container_name: itop 6 | ports: 7 | - 8000:80 8 | volumes: 9 | - /home/user/itop-extensions:/var/www/html/extensions 10 | restart: always -------------------------------------------------------------------------------- /debian/postinstall/addons/adduser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if root 4 | user=$(whoami) 5 | 6 | if [ $(whoami) != "root" ] 7 | then 8 | tput setaf 5; echo "ERROR : Execute script with sudo or root user !" 9 | exit 10 | fi 11 | 12 | # Get new user informations 13 | tput setaf 6; read -p "Please provide a name for a new user: " name 14 | if [ "$name" == "" ]; then 15 | tput setaf 5; echo "You did not entered a user name, so no user will be added after setup" 16 | fi 17 | tput setaf 6; read -p "Please provide a password for $name : " password 18 | tput setaf 6; read -p "Add $name to sudo group ? (Y/n)" addsudo 19 | if [ "$addsudo" == "" ]; then 20 | addsudo=Y 21 | fi 22 | 23 | USER=$name 24 | HOME=/home/$USER 25 | 26 | # Add new user 27 | echo "Add user $USER" 28 | adduser $USER --disabled-login 29 | echo "$USER:$password" | chpasswd 30 | if [ "$addsudo" == "Y" ]; then 31 | adduser $name_user sudo 32 | fi 33 | 34 | # Config new user 35 | echo "generate .ssh dir in homedir for user $USER" 36 | mkdir $HOME/.ssh 37 | chmod 0700 $HOME/.ssh 38 | 39 | echo "clone zsh git repo in $USER homedir" 40 | git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh 41 | chmod 0755 $HOME/.oh-my-zsh 42 | 43 | echo "setup default zsh settings" 44 | cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc 45 | chmod 0755 $HOME/.zshrc 46 | 47 | echo "set correct permissions" 48 | chown -R $USER:$USER /home/$USER 49 | 50 | echo "change shell for user $USER" 51 | chsh --shell /bin/zsh $USER 52 | 53 | 54 | echo "" 55 | echo "" 56 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 57 | tput bold; tput setaf 7; echo " => USER $USER ADDED <= " 58 | tput setaf 7; echo "" 59 | if [ "$addsudo" == "Y" ] 60 | then 61 | tput bold; tput setaf 7; echo " User added to sudo group " 62 | tput setaf 7; echo "" 63 | fi 64 | tput bold; tput setaf 6; echo " By PAPAMICA " 65 | tput bold; tput setaf 6; echo " Labo-Tech.fr / Tech2Tech.fr " 66 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 67 | tput setaf 2; echo "" -------------------------------------------------------------------------------- /debian/postinstall/debian_postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #################################################### 3 | # # 4 | # Configuration automatique de Debian par PAPAMICA # 5 | # # 6 | #################################################### 7 | 8 | 9 | function Verif-System { 10 | user=$(whoami) 11 | 12 | if [ $(whoami) != "root" ] 13 | then 14 | tput setaf 5; echo "ERREUR : Veuillez exécuter le script en tant que Root !" 15 | exit 16 | fi 17 | 18 | if [[ $(arch) != *"64" ]] 19 | then 20 | tput setaf 5; echo "ERREUR : Veuillez installer une version x64 !" 21 | exit 22 | fi 23 | 24 | } 25 | 26 | # Changement des sources APT 27 | version=$(grep "VERSION=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g) 28 | function Change-Source { 29 | echo "deb http://debian.mirrors.ovh.net/debian/ $version main contrib non-free 30 | deb-src http://debian.mirrors.ovh.net/debian/ $version main contrib non-free 31 | 32 | deb http://security.debian.org/ $version/updates main contrib non-free 33 | deb-src http://security.debian.org/ $version/updates main contrib non-free 34 | 35 | # $version-updates, previously known as 'volatile' 36 | deb http://debian.mirrors.ovh.net/debian/ $version-updates main contrib non-free 37 | deb-src http://debian.mirrors.ovh.net/debian/ $version-updates main contrib non-free" > /etc/apt/sources.list 38 | echo 'deb http://deb.debian.org/debian $version-backports main' > \ 39 | /etc/apt/sources.list.d/backports.list 40 | } 41 | 42 | 43 | # Mise à jours des paquets 44 | function Install-PaquetsEssentiels { 45 | apt update && apt upgrade -y 46 | apt install -y sudo 47 | apt install -y chpasswd 48 | apt install -y openssh-server 49 | apt install -y cockpit 50 | apt install -y locate 51 | apt install -y zsh 52 | apt install -y curl 53 | apt install -y fonts-powerline 54 | apt install -y fail2ban 55 | apt install -y mosh 56 | } 57 | 58 | # Installation des dépendances et de docker 59 | function Install-Docker { 60 | tput setaf 2; apt-get install -y apt-transport-https ca-certificates gnupg2 software-properties-common 61 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 62 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 63 | apt-get update 64 | apt-get -y install docker-ce docker-compose 65 | systemctl enable docker 66 | systemctl start docker 67 | } 68 | 69 | function Install-Zsh { 70 | tput setaf 2; chsh -s $(which zsh) 71 | 72 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/loket/oh-my-zsh/feature/batch-mode/tools/install.sh)" -s --batch || { 73 | echo "Could not install Oh My Zsh" >/dev/stderr 74 | exit 1 75 | } 76 | 77 | locale-gen --purge fr_FR.UTF-8 78 | echo -e 'LANG="fr_FR.UTF-8"\nLANGUAGE="fr_FR.UTF-8"\n' > /etc/default/locale 79 | 80 | 81 | # Modification de zsh 82 | for file in ~/.zshrc 83 | do 84 | echo "Traitement de $file ..." 85 | sed -i -e "s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=agnoster/g" "$file" 86 | done 87 | } 88 | 89 | function Update-db { 90 | updatedb 91 | } 92 | #Configuration et installation de Traefik et de Portainer 93 | function Install-TraefikPortainer { 94 | 95 | mkdir -p /apps/traefik 96 | mkdir -p /apps/portainer 97 | 98 | touch /apps/traefik/traefik.yml 99 | echo "api: 100 | dashboard: true 101 | 102 | entryPoints: 103 | http: 104 | address: \":80\" 105 | https: 106 | address: \":443\" 107 | 108 | providers: 109 | docker: 110 | endpoint: \"unix:///var/run/docker.sock\" 111 | exposedByDefault: false 112 | 113 | certificatesResolvers: 114 | http: 115 | acme: 116 | email: $email 117 | storage: acme.json 118 | httpChallenge: 119 | entryPoint: http 120 | 121 | providers.file: 122 | filename: \"/etc/traefik/dynamic_conf.toml\" 123 | watch: true 124 | " > /apps/traefik/traefik.yml 125 | 126 | touch /apps/traefik/config.yml 127 | echo "http: 128 | middlewares: 129 | https-redirect: 130 | redirectScheme: 131 | scheme: https 132 | 133 | default-headers: 134 | headers: 135 | frameDeny: true 136 | sslRedirect: true 137 | browserXssFilter: true 138 | contentTypeNosniff: true 139 | forceSTSHeader: true 140 | stsIncludeSubdomains: true 141 | stsPreload: true 142 | 143 | secured: 144 | chain: 145 | middlewares: 146 | - default-headers 147 | " > /apps/traefik/config.yml 148 | 149 | touch /apps/traefik/acme.json 150 | chmod 600 /apps/traefik/acme.json 151 | 152 | touch docker-compose.yml 153 | echo "version: '2' 154 | 155 | services: 156 | traefik: 157 | image: traefik:latest 158 | container_name: traefik 159 | restart: unless-stopped 160 | security_opt: 161 | - no-new-privileges:true 162 | networks: 163 | - proxy 164 | ports: 165 | - 80:80 166 | - 443:443 167 | volumes: 168 | - /etc/localtime:/etc/localtime:ro 169 | - /var/run/docker.sock:/var/run/docker.sock:ro 170 | - /apps/traefik/traefik.yml:/traefik.yml:ro 171 | - /apps/traefik/acme.json:/acme.json 172 | - /apps/traefik/config.yml:/config.yml:ro 173 | labels: 174 | - traefik.enable=true 175 | - traefik.http.routers.traefik.entrypoints=http 176 | - traefik.http.routers.traefik.rule=Host(\"traefik.$ndd\") 177 | - traefik.http.middlewares.traefik-auth.basicauth.users=admin:{SHA}0DPiKuNIrrVmD8IUCuw1hQxNqZc= 178 | - traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https 179 | - traefik.http.routers.traefik.middlewares=traefik-https-redirect 180 | - traefik.http.routers.traefik-secure.entrypoints=https 181 | - traefik.http.routers.traefik-secure.rule=Host(\"traefik.$ndd\") 182 | - traefik.http.routers.traefik-secure.middlewares=traefik-auth 183 | - traefik.http.routers.traefik-secure.tls=true 184 | - traefik.http.routers.traefik-secure.tls.certresolver=http 185 | - traefik.http.routers.traefik-secure.service=api@internal 186 | 187 | 188 | portainer: 189 | image: portainer/portainer-ce:latest 190 | container_name: portainer 191 | restart: unless-stopped 192 | security_opt: 193 | - no-new-privileges:true 194 | environment: 195 | TEMPLATES: https://github.com/PAPAMICA/docker-compose-collection/blob/master/templates-portainer.json 196 | networks: 197 | - proxy 198 | volumes: 199 | - /etc/localtime:/etc/localtime:ro 200 | - /var/run/docker.sock:/var/run/docker.sock:ro 201 | - /apps/portainer/data:/data 202 | labels: 203 | - traefik.enable=true 204 | - traefik.http.routers.portainer.entrypoints=http 205 | - traefik.http.routers.portainer.rule=Host(\"portainer.$ndd\") 206 | - traefik.http.middlewares.portainer-https-redirect.redirectscheme.scheme=https 207 | - traefik.http.routers.portainer.middlewares=portainer-https-redirect 208 | - traefik.http.routers.portainer-secure.entrypoints=https 209 | - traefik.http.routers.portainer-secure.rule=Host(\"portainer.$ndd\") 210 | - traefik.http.routers.portainer-secure.tls=true 211 | - traefik.http.routers.portainer-secure.tls.certresolver=http 212 | - traefik.http.routers.portainer-secure.service=portainer 213 | - traefik.http.services.portainer.loadbalancer.server.port=9000 214 | - traefik.docker.network=proxy 215 | 216 | 217 | networks: 218 | proxy: 219 | external: true 220 | " > docker-compose.yml 221 | 222 | tput setaf 2; docker network create proxy 223 | docker-compose up -d 224 | } 225 | 226 | function Change-Password { 227 | tput setaf 6; echo "root:$password_root" | chpasswd 228 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 229 | tput setaf 7; echo " => Mot de passe de Root a été changé. " 230 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 231 | tput setaf 2; adduser --quiet --disabled-password --shell /bin/bash --home /home/$name_user --gecos "User" $name_user 232 | tput setaf 2; echo "$name_user:$password_user" | chpasswd 233 | tput setaf 2; adduser $name_user sudo 234 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 235 | tput bold; tput setaf 7; echo " => L'utilisateur $name_user a été créé. " 236 | tput bold; tput setaf 7; echo " => $name_user fait parti du groupe sudo. " 237 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 238 | } 239 | 240 | # Changement du port SSH 241 | function Change-SSHPort { 242 | cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup 243 | 244 | for file in /etc/ssh/sshd_config 245 | do 246 | echo "Traitement de $file ..." 247 | sed -i -e "s/#Port 22/Port $ssh_port/" "$file" 248 | done 249 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 250 | tput setaf 7; echo " => Port SSH remplacé par $ssh_port. " 251 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 252 | 253 | } 254 | 255 | # Changement du motd 256 | function Change-MOTD { 257 | ip_du_serveur=$(hostname -i) 258 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 259 | tput bold; tput setaf 7; echo " => L'adresse IP du serveur est $ip_du_serveur. " 260 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 261 | 262 | 263 | echo " 264 | ██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗ 265 | ██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝ 266 | ██║ █╗ ██║█████╗ ██║ ██║ ██║ ██║██╔████╔██║█████╗ 267 | ██║███╗██║██╔══╝ ██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝ 268 | ╚███╔███╔╝███████╗███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ 269 | ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ 270 | 271 | Server : $name_server 272 | 273 | IP : $ip_du_serveur 274 | 275 | Provider : $name_provider 276 | 277 | " > /etc/motd 278 | 279 | } 280 | #----------------------------------------------------------------------------------------------------------------------------------- 281 | install_traefik = "n" 282 | clear 283 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 284 | tput setaf 7; echo " Script d'installation de Debian " 285 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 286 | 287 | tput setaf 6; read -p "Souhaitez vous créer les utilisateurs ? (y/n) " create_user 288 | if [ $create_user = "y" ] 289 | then 290 | tput setaf 6; read -p "===> Entrez le mot de passe pour Root : " password_root 291 | tput setaf 6; read -p "===> Entrez un nom d'utilisateur : " name_user 292 | tput setaf 6; read -p "===> Entrez le mot de passe pour l'utilisateur $name_user : " password_user 293 | fi 294 | echo "" 295 | 296 | tput setaf 6; read -p "Souhaitez vous changer le port SSH ? (recommandé) (y/n) " change_sshport 297 | if [ $change_sshport = "y" ] 298 | then 299 | tput setaf 6; read -p "===> Entrez port que vous souhaitez (ex : 2020) : " ssh_port 300 | fi 301 | echo "" 302 | 303 | tput setaf 6; read -p "Souhaitez vous changer le MOTD ? (y/n) " change_motd 304 | if [ $change_motd = "y" ] 305 | then 306 | tput setaf 6; read -p "===> Entrez le nom du serveur : " name_server 307 | tput setaf 6; read -p "===> Entrez le nom de l'hébergeur : " name_provider 308 | fi 309 | echo "" 310 | 311 | tput setaf 6; read -p "Souhaitez vous installer Docker ? (y/n) " install_docker 312 | if [ $install_docker = "y" ] 313 | then 314 | echo "" 315 | tput setaf 6; read -p "Souhaitez vous installer Traefik et Portainer ? (y/n) " install_traefik 316 | if [ $install_traefik = "y" ] 317 | then 318 | tput setaf 6; read -p "===> Entrez votre nom de domaine (ex : papamica.fr) : " ndd 319 | tput setaf 6; read -p "===> Entrez votre adresse mail pour Let's Encrypt : " email 320 | echo "" 321 | while [ -z $redirection ] || [ $redirection != 'y' ] 322 | do 323 | tput setaf 3; echo "ATTENTION ! Veuillez faire les redirections suivantes :" 324 | tput setaf 3; echo "=> Traefik : traefik.$ndd => IP WAN de votre serveur !" 325 | tput setaf 3; echo "=> Portainer : portainer.$ndd => IP WAN de votre serveur !" 326 | echo "" 327 | tput setaf 3; read -p "Les redirections ont bien été configurées ? (y/n) " redirection 328 | done 329 | fi 330 | fi 331 | echo "" 332 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 333 | tput setaf 7; echo " Début du script " 334 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 335 | echo "" 336 | echo "" 337 | 338 | 339 | tput setaf 6; echo "Vérification du système ................................................................... En cours" 340 | Verif-System 341 | tput setaf 7; echo "Vérification du système ................................................................... OK" 342 | echo "" 343 | 344 | 345 | tput setaf 6; echo "Configuration des sources ................................................................. En cours" 346 | Change-Source 347 | tput setaf 7; echo "Configuration des sources ................................................................. OK" 348 | echo "" 349 | 350 | tput setaf 6; echo "Installation des paquets essentiels........................................................ En cours" 351 | Install-PaquetsEssentiels 352 | tput setaf 7; echo "Installation des paquets essentiels........................................................ OK" 353 | echo "" 354 | 355 | tput setaf 6; echo "Installation de ZSH........................................................................ En cours" 356 | Install-Zsh 357 | tput setaf 7; echo "Installation de ZSH........................................................................ OK" 358 | echo "" 359 | 360 | tput setaf 6; echo "Mise à jour de la base de données.......................................................... En cours" 361 | Update-db 362 | tput setaf 7; echo "Mise à jour de la base de données.......................................................... OK" 363 | 364 | echo "" 365 | echo "" 366 | if [ $install_docker = "y" ] 367 | then 368 | tput setaf 6; echo "Installation de Docker..................................................................... En cours" 369 | Install-Docker 370 | tput setaf 7; echo "Installation de Docker..................................................................... OK" 371 | fi 372 | 373 | echo "" 374 | echo "" 375 | if [ $install_traefik = "y" ] 376 | then 377 | tput setaf 6; echo "Installation de Traefik et de Portainer.................................................... En cours" 378 | Install-TraefikPortainer 379 | tput setaf 7; echo "Installation de Traefik et de Portainer.................................................... OK" 380 | fi 381 | 382 | echo "" 383 | echo "" 384 | if [ $create_user = "y" ] 385 | then 386 | tput setaf 6; echo "Création des utilisateurs et changement des mots de passe.................................. En cours" 387 | Change-Password 388 | tput setaf 7; echo "Création des utilisateurs et changement des mots de passe.................................. OK" 389 | fi 390 | 391 | echo "" 392 | echo "" 393 | if [ $change_sshport = "y" ] 394 | then 395 | tput setaf 6; echo "Changement du port SSH.................................................................... En cours" 396 | Change-SSHPort 397 | tput setaf 7; echo "Changement du port SSH.................................................................... OK" 398 | fi 399 | 400 | echo "" 401 | echo "" 402 | if [ $change_motd = "y" ] 403 | then 404 | tput setaf 6; echo "Changement du MOTD....................................................................... En cours" 405 | Change-MOTD 406 | tput setaf 7; echo "Changement du MOTD....................................................................... OK" 407 | fi 408 | 409 | echo "" 410 | echo "" 411 | if [ $install_traefik = "y" ] 412 | then 413 | echo "" 414 | echo "" 415 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 416 | tput setaf 3; echo "" 417 | docker container ls 418 | fi 419 | 420 | echo "" 421 | echo "" 422 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 423 | tput bold; tput setaf 7; echo " => PREPARATION TERMINEE <= " 424 | tput setaf 7; echo "" 425 | if [ $install_traefik = "y" ] 426 | then 427 | tput bold; tput setaf 7; echo " Portainer.$ndd " 428 | tput bold; tput setaf 7; echo " Traefik.$ndd " 429 | tput bold; tput setaf 7; echo " Identifiant Traefik : admin / admin " 430 | tput setaf 7; echo "" 431 | fi 432 | tput bold; tput setaf 7; echo " Veuillez vous reconnecter " 433 | if [ $change_sshport = "y" ] 434 | then 435 | tput bold; tput setaf 7; echo " Votre nouveau port SSH : $ssh_port " 436 | fi 437 | tput setaf 7; echo "" 438 | tput bold; tput setaf 6; echo " By PAPAMICA " 439 | tput bold; tput setaf 6; echo " wiki-tech.io / Tech2Tech.fr " 440 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 441 | tput setaf 2; echo "" 442 | 443 | sleep 5 444 | # Redémarrage du service sshd 445 | service ssh restart 446 | 447 | -------------------------------------------------------------------------------- /debian/postinstall/motd_exemple: -------------------------------------------------------------------------------- 1 | █████╗ ███╗ ██╗███████╗██╗██████╗ ██╗ ███████╗ 2 | ██╔══██╗████╗ ██║██╔════╝██║██╔══██╗██║ ██╔════╝ 3 | ███████║██╔██╗ ██║███████╗██║██████╔╝██║ █████╗ 4 | ██╔══██║██║╚██╗██║╚════██║██║██╔══██╗██║ ██╔══╝ 5 | ██║ ██║██║ ╚████║███████║██║██████╔╝███████╗███████╗ 6 | ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝╚═════╝ ╚══════╝╚══════╝ 7 | |-------------------------------------------------| 8 | | Bienvenue | 9 | |-------------------------------------------------| 10 | |------------------- VPS -------------------| 11 | |-------------------------------------------------| 12 | | | 13 | | Server Ansible | 14 | | | 15 | | IP 93.113.206.142 | 16 | | | 17 | | Provider FirstHeberg | 18 | | Machine vps-48235 | 19 | | Purpose Prod Ansible | 20 | | | 21 | |-------------------------------------------------| 22 | -------------------------------------------------------------------------------- /debian/postinstall/ubuntu_postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #################################################### 3 | # # 4 | # Configuration automatique de Debian par PAPAMICA # 5 | # # 6 | #################################################### 7 | 8 | 9 | function Verif-System { 10 | user=$(whoami) 11 | 12 | if [ $(whoami) != "root" ] 13 | then 14 | tput setaf 5; echo "ERREUR : Veuillez exécuter le script en tant que Root !" 15 | exit 16 | fi 17 | 18 | if [[ $(arch) != *"64" ]] 19 | then 20 | tput setaf 5; echo "ERREUR : Veuillez installer une version x64 !" 21 | exit 22 | fi 23 | 24 | } 25 | 26 | # Changement des sources APT 27 | version=$(grep "VERSION=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g) 28 | function Change-Source { 29 | echo "deb http://debian.mirrors.ovh.net/debian/ $version main contrib non-free 30 | deb-src http://debian.mirrors.ovh.net/debian/ $version main contrib non-free 31 | 32 | deb http://security.debian.org/ $version/updates main contrib non-free 33 | deb-src http://security.debian.org/ $version/updates main contrib non-free 34 | 35 | # $version-updates, previously known as 'volatile' 36 | deb http://debian.mirrors.ovh.net/debian/ $version-updates main contrib non-free 37 | deb-src http://debian.mirrors.ovh.net/debian/ $version-updates main contrib non-free" > /etc/apt/sources.list 38 | echo 'deb http://deb.debian.org/debian $version-backports main' > \ 39 | /etc/apt/sources.list.d/backports.list 40 | } 41 | 42 | 43 | # Mise à jours des paquets 44 | function Install-PaquetsEssentiels { 45 | apt update && apt upgrade -y 46 | apt install -y sudo 47 | apt install -y chpasswd 48 | apt install -y openssh-server 49 | apt install -y cockpit 50 | apt install -y locate 51 | apt install -y zsh 52 | apt install -y curl 53 | apt install -y fonts-powerline 54 | apt install -y fail2ban 55 | } 56 | 57 | # Installation des dépendances et de docker 58 | function Install-Docker { 59 | tput setaf 2; apt-get install -y apt-transport-https ca-certificates gnupg2 software-properties-common 60 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 61 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 62 | apt-get update 63 | apt-get -y install docker-ce docker-compose 64 | systemctl enable docker 65 | systemctl start docker 66 | } 67 | 68 | function Install-Zsh { 69 | tput setaf 2; chsh -s $(which zsh) 70 | 71 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/loket/oh-my-zsh/feature/batch-mode/tools/install.sh)" -s --batch || { 72 | echo "Could not install Oh My Zsh" >/dev/stderr 73 | exit 1 74 | } 75 | 76 | locale-gen --purge fr_FR.UTF-8 77 | echo -e 'LANG="fr_FR.UTF-8"\nLANGUAGE="fr_FR.UTF-8"\n' > /etc/default/locale 78 | 79 | 80 | # Modification de zsh 81 | for file in ~/.zshrc 82 | do 83 | echo "Traitement de $file ..." 84 | sed -i -e "s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=agnoster/g" "$file" 85 | done 86 | } 87 | 88 | function Update-db { 89 | updatedb 90 | } 91 | #Configuration et installation de Traefik et de Portainer 92 | function Install-TraefikPortainer { 93 | 94 | mkdir -p /apps/traefik 95 | mkdir -p /apps/portainer 96 | 97 | touch /apps/traefik/traefik.yml 98 | echo "api: 99 | dashboard: true 100 | 101 | entryPoints: 102 | http: 103 | address: \":80\" 104 | https: 105 | address: \":443\" 106 | 107 | providers: 108 | docker: 109 | endpoint: \"unix:///var/run/docker.sock\" 110 | exposedByDefault: false 111 | 112 | certificatesResolvers: 113 | http: 114 | acme: 115 | email: $email 116 | storage: acme.json 117 | httpChallenge: 118 | entryPoint: http 119 | 120 | providers.file: 121 | filename: \"/etc/traefik/dynamic_conf.toml\" 122 | watch: true 123 | " > /apps/traefik/traefik.yml 124 | 125 | touch /apps/traefik/config.yml 126 | echo "http: 127 | middlewares: 128 | https-redirect: 129 | redirectScheme: 130 | scheme: https 131 | 132 | default-headers: 133 | headers: 134 | frameDeny: true 135 | sslRedirect: true 136 | browserXssFilter: true 137 | contentTypeNosniff: true 138 | forceSTSHeader: true 139 | stsIncludeSubdomains: true 140 | stsPreload: true 141 | 142 | secured: 143 | chain: 144 | middlewares: 145 | - default-headers 146 | " > /apps/traefik/config.yml 147 | 148 | touch /apps/traefik/acme.json 149 | chmod 600 /apps/traefik/acme.json 150 | 151 | touch docker-compose.yml 152 | echo "version: '2' 153 | 154 | services: 155 | traefik: 156 | image: traefik:latest 157 | container_name: traefik 158 | restart: unless-stopped 159 | security_opt: 160 | - no-new-privileges:true 161 | networks: 162 | - proxy 163 | ports: 164 | - 80:80 165 | - 443:443 166 | volumes: 167 | - /etc/localtime:/etc/localtime:ro 168 | - /var/run/docker.sock:/var/run/docker.sock:ro 169 | - /apps/traefik/traefik.yml:/traefik.yml:ro 170 | - /apps/traefik/acme.json:/acme.json 171 | - /apps/traefik/config.yml:/config.yml:ro 172 | labels: 173 | - traefik.enable=true 174 | - traefik.http.routers.traefik.entrypoints=http 175 | - traefik.http.routers.traefik.rule=Host(\"traefik.$ndd\") 176 | - traefik.http.middlewares.traefik-auth.basicauth.users=admin:{SHA}0DPiKuNIrrVmD8IUCuw1hQxNqZc= 177 | - traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https 178 | - traefik.http.routers.traefik.middlewares=traefik-https-redirect 179 | - traefik.http.routers.traefik-secure.entrypoints=https 180 | - traefik.http.routers.traefik-secure.rule=Host(\"traefik.$ndd\") 181 | - traefik.http.routers.traefik-secure.middlewares=traefik-auth 182 | - traefik.http.routers.traefik-secure.tls=true 183 | - traefik.http.routers.traefik-secure.tls.certresolver=http 184 | - traefik.http.routers.traefik-secure.service=api@internal 185 | 186 | 187 | portainer: 188 | image: portainer/portainer:latest 189 | container_name: portainer 190 | restart: unless-stopped 191 | security_opt: 192 | - no-new-privileges:true 193 | networks: 194 | - proxy 195 | volumes: 196 | - /etc/localtime:/etc/localtime:ro 197 | - /var/run/docker.sock:/var/run/docker.sock:ro 198 | - /apps/portainer/data:/data 199 | labels: 200 | - traefik.enable=true 201 | - traefik.http.routers.portainer.entrypoints=http 202 | - traefik.http.routers.portainer.rule=Host(\"portainer.$ndd\") 203 | - traefik.http.middlewares.portainer-https-redirect.redirectscheme.scheme=https 204 | - traefik.http.routers.portainer.middlewares=portainer-https-redirect 205 | - traefik.http.routers.portainer-secure.entrypoints=https 206 | - traefik.http.routers.portainer-secure.rule=Host(\"portainer.$ndd\") 207 | - traefik.http.routers.portainer-secure.tls=true 208 | - traefik.http.routers.portainer-secure.tls.certresolver=http 209 | - traefik.http.routers.portainer-secure.service=portainer 210 | - traefik.http.services.portainer.loadbalancer.server.port=9000 211 | - traefik.docker.network=proxy 212 | 213 | 214 | networks: 215 | proxy: 216 | external: true 217 | " > docker-compose.yml 218 | 219 | tput setaf 2; docker network create proxy 220 | docker-compose up -d 221 | } 222 | 223 | function Change-Password { 224 | tput setaf 6; echo "root:$password_root" | chpasswd 225 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 226 | tput setaf 7; echo " => Mot de passe de Root a été changé. " 227 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 228 | tput setaf 2; adduser --quiet --disabled-password --shell /bin/bash --home /home/$name_user --gecos "User" $name_user 229 | tput setaf 2; echo "$name_user:$password_user" | chpasswd 230 | tput setaf 2; adduser $name_user sudo 231 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 232 | tput bold; tput setaf 7; echo " => L'utilisateur $name_user a été créé. " 233 | tput bold; tput setaf 7; echo " => $name_user fait parti du groupe sudo. " 234 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 235 | } 236 | 237 | # Changement du port SSH 238 | function Change-SSHPort { 239 | cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup 240 | 241 | for file in /etc/ssh/sshd_config 242 | do 243 | echo "Traitement de $file ..." 244 | sed -i -e "s/#Port 22/Port $ssh_port/" "$file" 245 | done 246 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 247 | tput setaf 7; echo " => Port SSH remplacé par $ssh_port. " 248 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 249 | 250 | } 251 | 252 | # Changement du motd 253 | function Change-MOTD { 254 | ip_du_serveur=$(hostname -i) 255 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 256 | tput bold; tput setaf 7; echo " => L'adresse IP du serveur est $ip_du_serveur. " 257 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 258 | 259 | 260 | echo " 261 | ██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗ 262 | ██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝ 263 | ██║ █╗ ██║█████╗ ██║ ██║ ██║ ██║██╔████╔██║█████╗ 264 | ██║███╗██║██╔══╝ ██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝ 265 | ╚███╔███╔╝███████╗███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ 266 | ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ 267 | 268 | Server : $name_server 269 | 270 | IP : $ip_du_serveur 271 | 272 | Provider : $name_provider 273 | 274 | " > /etc/motd 275 | 276 | } 277 | #----------------------------------------------------------------------------------------------------------------------------------- 278 | install_traefik = "n" 279 | clear 280 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 281 | tput setaf 7; echo " Script d'installation de Debian " 282 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 283 | 284 | tput setaf 6; read -p "Souhaitez vous créer les utilisateurs ? (y/n) " create_user 285 | if [ $create_user = "y" ] 286 | then 287 | tput setaf 6; read -p "===> Entrez le mot de passe pour Root : " password_root 288 | tput setaf 6; read -p "===> Entrez un nom d'utilisateur : " name_user 289 | tput setaf 6; read -p "===> Entrez le mot de passe pour l'utilisateur $name_user : " password_user 290 | fi 291 | echo "" 292 | 293 | tput setaf 6; read -p "Souhaitez vous changer le port SSH ? (recommandé) (y/n) " change_sshport 294 | if [ $change_sshport = "y" ] 295 | then 296 | tput setaf 6; read -p "===> Entrez port que vous souhaitez (ex : 2020) : " ssh_port 297 | fi 298 | echo "" 299 | 300 | tput setaf 6; read -p "Souhaitez vous changer le MOTD ? (y/n) " change_motd 301 | if [ $change_motd = "y" ] 302 | then 303 | tput setaf 6; read -p "===> Entrez le nom du serveur : " name_server 304 | tput setaf 6; read -p "===> Entrez le nom de l'hébergeur : " name_provider 305 | fi 306 | echo "" 307 | 308 | tput setaf 6; read -p "Souhaitez vous installer Docker ? (y/n) " install_docker 309 | if [ $install_docker = "y" ] 310 | then 311 | echo "" 312 | tput setaf 6; read -p "Souhaitez vous installer Traefik et Portainer ? (y/n) " install_traefik 313 | if [ $install_traefik = "y" ] 314 | then 315 | tput setaf 6; read -p "===> Entrez votre nom de domaine (ex : papamica.fr) : " ndd 316 | tput setaf 6; read -p "===> Entrez votre adresse mail pour Let's Encrypt : " email 317 | echo "" 318 | while [ -z $redirection ] || [ $redirection != 'y' ] 319 | do 320 | tput setaf 3; echo "ATTENTION ! Veuillez faire les redirections suivantes :" 321 | tput setaf 3; echo "=> Traefik : traefik.$ndd => IP WAN de votre serveur !" 322 | tput setaf 3; echo "=> Portainer : portainer.$ndd => IP WAN de votre serveur !" 323 | echo "" 324 | tput setaf 3; read -p "Les redirections ont bien été configurées ? (y/n) " redirection 325 | done 326 | fi 327 | fi 328 | echo "" 329 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 330 | tput setaf 7; echo " Début du script " 331 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 332 | echo "" 333 | echo "" 334 | 335 | 336 | tput setaf 6; echo "Vérification du système ................................................................... En cours" 337 | Verif-System 338 | tput setaf 7; echo "Vérification du système ................................................................... OK" 339 | echo "" 340 | 341 | 342 | #tput setaf 6; echo "Configuration des sources ................................................................. En cours" 343 | #Change-Source 344 | #tput setaf 7; echo "Configuration des sources ................................................................. OK" 345 | #echo "" 346 | 347 | tput setaf 6; echo "Installation des paquets essentiels........................................................ En cours" 348 | Install-PaquetsEssentiels 349 | tput setaf 7; echo "Installation des paquets essentiels........................................................ OK" 350 | echo "" 351 | 352 | tput setaf 6; echo "Installation de ZSH........................................................................ En cours" 353 | Install-Zsh 354 | tput setaf 7; echo "Installation de ZSH........................................................................ OK" 355 | echo "" 356 | 357 | tput setaf 6; echo "Mise à jour de la base de données.......................................................... En cours" 358 | Update-db 359 | tput setaf 7; echo "Mise à jour de la base de données.......................................................... OK" 360 | 361 | echo "" 362 | echo "" 363 | if [ $install_docker = "y" ] 364 | then 365 | tput setaf 6; echo "Installation de Docker..................................................................... En cours" 366 | Install-Docker 367 | tput setaf 7; echo "Installation de Docker..................................................................... OK" 368 | fi 369 | 370 | echo "" 371 | echo "" 372 | if [ $install_traefik = "y" ] 373 | then 374 | tput setaf 6; echo "Installation de Traefik et de Portainer.................................................... En cours" 375 | Install-TraefikPortainer 376 | tput setaf 7; echo "Installation de Traefik et de Portainer.................................................... OK" 377 | fi 378 | 379 | echo "" 380 | echo "" 381 | if [ $create_user = "y" ] 382 | then 383 | tput setaf 6; echo "Création des utilisateurs et changement des mots de passe.................................. En cours" 384 | Change-Password 385 | tput setaf 7; echo "Création des utilisateurs et changement des mots de passe.................................. OK" 386 | fi 387 | 388 | echo "" 389 | echo "" 390 | if [ $change_sshport = "y" ] 391 | then 392 | tput setaf 6; echo "Changement du port SSH.................................................................... En cours" 393 | Change-SSHPort 394 | tput setaf 7; echo "Changement du port SSH.................................................................... OK" 395 | fi 396 | 397 | echo "" 398 | echo "" 399 | if [ $change_motd = "y" ] 400 | then 401 | tput setaf 6; echo "Changement du MOTD....................................................................... En cours" 402 | Change-MOTD 403 | tput setaf 7; echo "Changement du MOTD....................................................................... OK" 404 | fi 405 | 406 | echo "" 407 | echo "" 408 | if [ $install_traefik = "y" ] 409 | then 410 | echo "" 411 | echo "" 412 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 413 | tput setaf 3; echo "" 414 | docker container ls 415 | fi 416 | 417 | echo "" 418 | echo "" 419 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 420 | tput bold; tput setaf 7; echo " => PREPARATION TERMINEE <= " 421 | tput setaf 7; echo "" 422 | if [ $install_traefik = "y" ] 423 | then 424 | tput bold; tput setaf 7; echo " Portainer.$ndd " 425 | tput bold; tput setaf 7; echo " Traefik.$ndd " 426 | tput bold; tput setaf 7; echo " Identifiant Traefik : admin / admin " 427 | tput setaf 7; echo "" 428 | fi 429 | tput bold; tput setaf 7; echo " Veuillez vous reconnecter " 430 | if [ $change_sshport = "y" ] 431 | then 432 | tput bold; tput setaf 7; echo " Votre nouveau port SSH : $ssh_port " 433 | fi 434 | tput setaf 7; echo "" 435 | tput bold; tput setaf 6; echo " By PAPAMICA " 436 | tput bold; tput setaf 6; echo " Labo-Tech.fr / Tech2Tech.fr " 437 | tput setaf 7; echo "----------------------------------------------------------------------------------------------------" 438 | tput setaf 2; echo "" 439 | 440 | sleep 5 441 | # Redémarrage du service sshd 442 | service ssh restart 443 | 444 | -------------------------------------------------------------------------------- /debian/wordpress/debian_install_wordpress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | SERVER_IP=$(hostname -i) 4 | 5 | 6 | # Installation des dépendances et de docker 7 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 8 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 9 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 10 | apt-get update 11 | apt-get -y install docker-ce docker-compose 12 | systemctl enable docker 13 | systemctl start docker 14 | 15 | #Lancement du docker-compose.yml 16 | docker-compose up -d 17 | 18 | clear 19 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 20 | tput setaf 3; echo "" 21 | docker container ls 22 | echo "" 23 | tput setaf 7; echo "--------------------------------------------------" 24 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <= " 25 | tput setaf 7; echo "" 26 | tput setaf 7; echo " Lien : $SERVER_IP:80/wp-admin " 27 | tput setaf 7; echo " Identifiant : user " 28 | tput setaf 7; echo " Mot de passe : bitnami " 29 | tput setaf 7; echo "" 30 | tput bold; tput setaf 6; echo " By PAPAMICA " 31 | tput bold; tput setaf 6; echo " Labo-Tech.fr " 32 | tput setaf 7; echo "--------------------------------------------------" 33 | tput setaf 2; echo "" 34 | -------------------------------------------------------------------------------- /debian/wordpress/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mariadb: 4 | image: 'bitnami/mariadb:10.3' 5 | volumes: 6 | - 'mariadb_data:/bitnami' 7 | environment: 8 | - MARIADB_USER=wordpress 9 | - MARIADB_DATABASE=wordpress 10 | - ALLOW_EMPTY_PASSWORD=yes 11 | wordpress: 12 | image: 'bitnami/wordpress' 13 | ports: 14 | - '80:80' 15 | - '443:443' 16 | volumes: 17 | - 'wordpress_data:/bitnami' 18 | depends_on: 19 | - mariadb 20 | environment: 21 | - MARIADB_HOST=mariadb 22 | - MARIADB_PORT_NUMBER=3306 23 | - WORDPRESS_DATABASE_USER=wordpress 24 | - WORDPRESS_DATABASE_NAME=wordpress 25 | - ALLOW_EMPTY_PASSWORD=yes 26 | volumes: 27 | mariadb_data: 28 | driver: local 29 | wordpress_data: 30 | driver: local -------------------------------------------------------------------------------- /debian/zabbix-agent/debian_install_zabbix_agent.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | clear 4 | tput setaf 7; read -p "Entrez le nom du serveur : " server_name 5 | tput setaf 7; read -p "Entrez l'ip du serveur Zabbix : " server_ip 6 | #tput setaf 2; dpkg -i zabbix-release_4.0-3+stretch_all.deb 7 | 8 | apt-get update 9 | apt-get install zabbix-agent -y 10 | 11 | for file in /etc/zabbix/zabbix_agentd.conf 12 | do 13 | echo "Traitement de $file ..." 14 | sed -i -e "s/Server=127.0.0.1/Server=$server_ip/g" "$file" 15 | sed -i -e "s/Hostname=Zabbix server/Hostname=$server_name/g" "$file" 16 | done 17 | 18 | service zabbix-agent start 19 | systemctl enable zabbix-agent 20 | systemctl start zabbix-agent 21 | 22 | clear 23 | tput bold; tput setaf 7; echo "STATUS DU SERVICE AGENT-ZABBIX : " 24 | tput setaf 3; echo "" 25 | systemctl status zabbix-agent 26 | tput setaf 3; echo "" 27 | tput bold; tput setaf 7; echo "-------------------------------------------------" 28 | tput bold; tput setaf 7; echo " => AGENT ZABBIX OK <=" 29 | tput setaf 7; echo "" 30 | tput bold; tput setaf 6; echo " By PAPAMICA" 31 | tput bold; tput setaf 6; echo " Labo-Tech.fr" 32 | tput bold; tput setaf 7; echo "-------------------------------------------------" 33 | tput setaf 2; echo "" 34 | 35 | -------------------------------------------------------------------------------- /debian/zabbix-proxy/debian_install_zabbix_proxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | # Principaux paramètres 4 | tput setaf 7; read -p "Entrez l'ip du serveur Zabbix principal: " ZABBIX_HOST_IP 5 | tput setaf 7; read -p "Entrez le nom de ce proxy: " ZABBIX_PROXY_HOSTNAME 6 | 7 | tput setaf 2; echo "" 8 | 9 | # Installation des dépendances et de docker 10 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 11 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 12 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 13 | apt-get update 14 | apt-get -y install docker-ce docker-compose 15 | apt-get -y install snmpd snmp 16 | systemctl enable docker 17 | systemctl enable snmpd 18 | systemctl start docker 19 | systemctl start snmpd 20 | 21 | # Modification et lancement du docker-compose.yml 22 | for file in ~/scripts/debian/zabbix-proxy/docker-compose.yml 23 | do 24 | echo "Traitement de $file ..." 25 | sed -i -e "s/ZABBIX_HOST_IP/$ZABBIX_HOST_IP/g" "$file" 26 | sed -i -e "s/ZABBIX_PROXY_HOSTNAME/$ZABBIX_PROXY_HOSTNAME/g" "$file" 27 | done 28 | 29 | docker-compose up -d 30 | 31 | clear 32 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 33 | tput setaf 3; echo "" 34 | docker container ls 35 | echo "" 36 | tput setaf 7; echo "-------------------------------------------------" 37 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <=" 38 | tput setaf 7; echo "" 39 | tput setaf 7; echo " Nom du proxy : $ZABBIX_PROXY_HOSTNAME " 40 | tput setaf 7; echo "" 41 | tput bold; tput setaf 6; echo " By PAPAMICA" 42 | tput bold; tput setaf 6; echo " Labo-Tech.fr" 43 | tput setaf 7; echo "-------------------------------------------------" 44 | tput setaf 2; echo "" 45 | 46 | -------------------------------------------------------------------------------- /debian/zabbix-proxy/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | zabbix-proxy: # The Postgres Database Service 4 | image: zabbix/zabbix-proxy-sqlite3:ubuntu-5.0-latest 5 | restart: always 6 | container_name: proxy-zabbix 7 | environment: # Username, password and database name variables 8 | ZBX_PROXYMODE: 0 9 | ZBX_HOSTNAME: ZABBIX_PROXY_HOSTNAME 10 | ZBX_SERVER_HOST: ZABBIX_HOST_IP 11 | ZBX_ENABLEREMOTECOMMANDS: 1 12 | ZBX_STARTPINGERS: 1 13 | ZBX_STARTPOLLERS: 5 14 | ZBX_IPMIPOLLERS: 1 15 | ZBX_STARTPOLLERSUNREACHABLE: 1 16 | ZBX_STARTTRAPPERS: 5 17 | ZBX_STARTPINGERS: 1 18 | ZBX_STARTDISCOVERERS: 1 19 | ZBX_STARTHTTPPOLLERS: 1 20 | ZBX_STARTVMWARECOLLECTORS: 10 21 | ZBX_VMWAREFREQUENCY: 60 22 | ZBX_VMWAREPERFFREQUENCY: 60 23 | ZBX_VMWARECACHESIZE: 8M 24 | ZBX_VMWARETIMEOUT: 10 25 | ports: 26 | - 10051:10051 27 | -------------------------------------------------------------------------------- /debian/zabbix-server/debian_install_zabbix_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | # Principaux paramètres 4 | tput setaf 7; read -p "Entrez le mot de passe pour la base de données Zabbix : " ZABBIX_DB_USER_PASSWORD 5 | read -p "Entrez l'adresse ip du serveur : " SERVER_IP 6 | #SERVER_IP=$(hostname -i) 7 | tput setaf 2; echo "" 8 | 9 | # Installation des dépendances et de docker 10 | apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common 11 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - 12 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" 13 | apt-get update 14 | apt-get -y install docker-ce docker-compose 15 | apt-get install snmpd snmp 16 | systemctl enable docker 17 | systemctl enable snmpd 18 | systemctl start docker 19 | systemctl start snmpd 20 | 21 | # Modification et lancement du docker-compose.yml 22 | for file in ~/scripts/debian/zabbix-server/docker-compose.yml 23 | do 24 | echo "Traitement de $file ..." 25 | sed -i -e "s/zabbix-bdd-password/$ZABBIX_DB_USER_PASSWORD/g" "$file" 26 | done 27 | 28 | docker-compose up -d 29 | 30 | clear 31 | tput bold; tput setaf 7; echo "LISTES DES CONTAINERS EN COURS : " 32 | tput setaf 3; echo "" 33 | docker container ls 34 | echo "" 35 | tput setaf 7; echo "-------------------------------------------------" 36 | tput bold; tput setaf 7; echo " => INSTALLATION TERMINEE <=" 37 | tput setaf 7; echo "" 38 | tput setaf 7; echo " IP du serveur Zabbix : $SERVER_IP:8090 " 39 | tput setaf 7; echo " ID : Admin / MDP : zabbix " 40 | tput setaf 7; echo "" 41 | tput setaf 7; echo " IP du serveur Grafana : $SERVER_IP:3000 " 42 | tput setaf 7; echo " ID : admin / MDP : admin " 43 | tput setaf 7; echo "" 44 | tput bold; tput setaf 6; echo " By PAPAMICA" 45 | tput bold; tput setaf 6; echo " Labo-Tech.fr" 46 | tput setaf 7; echo "-------------------------------------------------" 47 | tput setaf 2; echo "" 48 | 49 | -------------------------------------------------------------------------------- /debian/zabbix-server/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | postgres-server: # The Postgres Database Service 4 | image: postgres:12.2 5 | restart: always 6 | container_name: zabbix-db 7 | environment: # Username, password and database name variables 8 | POSTGRES_USER: zabbix 9 | POSTGRES_PASSWORD: zabbix-bdd-password 10 | POSTGRES_DB: zabbix 11 | PG_DATA: /var/lib/postgresql/data/pgdata #data storage 12 | volumes: 13 | - /apps/zabbix/db:/var/lib/postgresql/data 14 | 15 | zabbix-server: # The main Zabbix Server Software Service 16 | image: zabbix/zabbix-server-pgsql:ubuntu-latest 17 | restart: always 18 | container_name: zabbix 19 | environment: # The Postgres database value variable 20 | POSTGRES_USER: zabbix 21 | POSTGRES_PASSWORD: zabbix-bdd-password 22 | POSTGRES_DB: zabbix 23 | ZBX_HISTORYSTORAGETYPES: log,text #Zabbix configuration variables 24 | ZBX_DEBUGLEVEL: 1 25 | ZBX_HOUSEKEEPINGFREQUENCY: 1 26 | ZBX_MAXHOUSEKEEPERDELETE: 5000 27 | ZBX_STARTVMWARECOLLECTORS: 10 28 | ZBX_VMWAREFREQUENCY: 30 29 | ZBX_VMWAREPERFFREQUENCY: 30 30 | ZBX_VMWARECACHESIZE: 16M 31 | ZBX_VMWARETIMEOUT: 10 32 | depends_on: 33 | - postgres-server 34 | ports: 35 | - 10051:10051 36 | volumes: # Volumes for scripts and related files you can add 37 | - /apps/zabbix/alertscripts:/usr/lib/zabbix/alertscripts 38 | 39 | zabbix-web: # The main Zabbix web UI or interface 40 | image: zabbix/zabbix-web-nginx-pgsql:ubuntu-latest 41 | restart: always 42 | container_name: zabbix-web 43 | environment: # Postgre database variables 44 | POSTGRES_USER: zabbix 45 | POSTGRES_PASSWORD: zabbix-bdd-password 46 | POSTGRES_DB: zabbix 47 | ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables 48 | ZBX_POSTMAXSIZE: 64M 49 | PHP_TZ: "Europe/Paris" 50 | ZBX_MAXEXECUTIONTIME: 500 51 | depends_on: 52 | - postgres-server 53 | - zabbix-server 54 | ports: # Port where Zabbix UI is available 55 | - 8090:8080 56 | 57 | grafana-xxl: #optional more functional and creative UI 58 | image: monitoringartist/grafana-xxl:latest 59 | restart: always 60 | container_name: grafana 61 | # volumes: 62 | # - /apps/grafana/config:/etc/grafana 63 | # - /apps/grafana/data:/var/lib/grafana 64 | environment: 65 | # - GF_PATHS_DATA=/config/data 66 | # - GF_PATHS_LOGS=/config/logs 67 | # - GF_PATHS_PLUGINS=/config/plugins 68 | - UPGRADEALL=false 69 | - GF_PANELS_DISABLE_SANITIZE_HTML=true 70 | - GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-worldmap-panel 71 | ports: 72 | - 3000:3000 73 | -------------------------------------------------------------------------------- /docker-compose/bookstack/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour VSCode avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | services: 7 | bookstack: 8 | image: linuxserver/bookstack 9 | container_name: bookstack 10 | environment: 11 | - PUID=1000 12 | - PGID=1000 13 | - DB_HOST=bookstack_db 14 | - DB_USER=bookstack 15 | - DB_PASS=yourdbpass 16 | - DB_DATABASE=bookstackapp 17 | - APP_URL=https://wiki.ndd.fr 18 | volumes: 19 | - /apps/bookstack/config:/config 20 | ports: 21 | - 6875:80 22 | restart: unless-stopped 23 | depends_on: 24 | - bookstack_db 25 | # networks: 26 | # - proxy 27 | # labels: 28 | # - "traefik.enable=true" 29 | # - "traefik.http.routers.wiki.entrypoints=http" 30 | # - "traefik.http.routers.wiki.rule=Host(`wiki.ndd.fr`)" 31 | # - "traefik.http.middlewares.wiki-https-redirect.redirectscheme.scheme=https" 32 | # - "traefik.http.routers.wiki.middlewares=wiki-https-redirect" 33 | # - "traefik.http.routers.wiki-secure.entrypoints=https" 34 | # - "traefik.http.routers.wiki-secure.rule=Host(`wiki.ndd.fr`)" 35 | # - "traefik.http.routers.wiki-secure.tls=true" 36 | # - "traefik.http.routers.wiki-secure.tls.certresolver=http" 37 | # - "traefik.docker.network=proxy" 38 | 39 | bookstack_db: 40 | image: linuxserver/mariadb 41 | container_name: bookstack_db 42 | environment: 43 | - PUID=1000 44 | - PGID=1000 45 | - MYSQL_ROOT_PASSWORD=yourdbpass 46 | - TZ=Europe/Paris 47 | - MYSQL_DATABASE=bookstackapp 48 | - MYSQL_USER=bookstack 49 | - MYSQL_PASSWORD=yourdbpass 50 | volumes: 51 | - /apps/bookstack/db:/config 52 | restart: unless-stopped 53 | # networks: 54 | # - proxy 55 | # 56 | #networks: 57 | # proxy: 58 | # external: 59 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/cachethq/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Cachet avec le support de Zabbix et de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: "2" 6 | 7 | services: 8 | postgres: 9 | container_name: cachet-db 10 | image: postgres:9.5 11 | volumes: 12 | - /apps/cachet/db:/var/lib/postgresql/data 13 | environment: 14 | - POSTGRES_USER=postgres 15 | - POSTGRES_PASSWORD=postgres 16 | restart: always 17 | # networks: 18 | # - proxy 19 | 20 | cachet: 21 | image: cachethq/docker 22 | ports: 23 | - 8580:8000 24 | container_name: cachet 25 | volumes: 26 | - /apps/cachet/data:/var/www/html/ 27 | links: 28 | - postgres:postgres 29 | environment: 30 | - MAIL_DRIVER=smtp 31 | - MAIL_HOST=SSL0.OVH.NET 32 | - MAIL_PORT=587 33 | - MAIL_USERNAME=email@domaine.fr 34 | - MAIL_PASSWORD=password 35 | - MAIL_ADDRESS=email@domaine.fr 36 | - MAIL_NAME=Notifications 37 | # - MAIL_ENCRYPTION=tls 38 | - DB_DRIVER=pgsql 39 | - DB_HOST=postgres 40 | - DB_PORT=5432 41 | - DB_DATABASE=postgres 42 | - DB_USERNAME=postgres 43 | - DB_PASSWORD=postgres 44 | - DB_PREFIX=chq_ 45 | - APP_KEY= # VOIR DOC CACHET 46 | - APP_LOG=errorlog 47 | # - APP_ENV=${APP_ENV:-production} 48 | - APP_DEBUG=false 49 | - DEBUG=false 50 | depends_on: 51 | - postgres 52 | restart: always 53 | # networks: 54 | # - proxy 55 | # labels: 56 | # - "traefik.enable=true" 57 | # - "traefik.http.routers.status.entrypoints=http" 58 | # - "traefik.http.routers.status.rule=Host(`status.nomdedomaine.fr`)" 59 | # - "traefik.http.middlewares.status-https-redirect.redirectscheme.scheme=https" 60 | # - "traefik.http.routers.status.middlewares=status-https-redirect" 61 | # - "traefik.http.routers.status-secure.entrypoints=https" 62 | # - "traefik.http.routers.status-secure.rule=Host(`status.nomdedomaine.fr`)" 63 | # - "traefik.http.routers.status-secure.tls=true" 64 | # - "traefik.http.routers.status-secure.tls.certresolver=http" 65 | # - "traefik.http.services.status-secure.loadbalancer.server.port=8000" 66 | # - "traefik.docker.network=proxy" 67 | 68 | zabbix-cachet: 69 | image: qk4l/zabbix-cachet 70 | container_name: cachet-zabbix 71 | volumes: 72 | - /apps/cachet/config.yml:/config.yml 73 | restart: always 74 | # networks: 75 | # - proxy 76 | 77 | #networks: 78 | # proxy: 79 | # external: 80 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/filebrowser/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour FileBrowser avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | 6 | version: '2' 7 | 8 | services: 9 | filebrowser: 10 | image: filebrowser/filebrowser 11 | container_name: filebrowser 12 | restart: unless-stopped 13 | volumes: 14 | - /DATA:/srv 15 | - /apps/filebrowser/config.json:/config.json 16 | - /apps/filebrowser/database.db:/database.db 17 | # networks: 18 | # - proxy 19 | # labels: 20 | # - "traefik.enable=true" 21 | # - "traefik.http.routers.filebrowser.entrypoints=http" 22 | # - "traefik.http.routers.filebrowser.rule=Host(`filebrowser.papamica.fr`)" 23 | # - "traefik.http.middlewares.filebrowser-https-redirect.redirectscheme.scheme=https" 24 | # - "traefik.http.routers.filebrowser.middlewares=filebrowser-https-redirect" 25 | # - "traefik.http.routers.filebrowser-secure.entrypoints=https" 26 | # - "traefik.http.routers.filebrowser-secure.rule=Host(`filebrowser.papamica.fr`)" 27 | # - "traefik.http.routers.filebrowser-secure.tls=true" 28 | # - "traefik.http.routers.filebrowser-secure.tls.certresolver=http" 29 | # - "traefik.docker.network=proxy" 30 | # 31 | #networks: 32 | # proxy: 33 | # external: 34 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/flood-torrent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour FloodTorrent avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | 6 | version: '2' 7 | services: 8 | flood-torrent: 9 | container_name: flood-torrent 10 | volumes: 11 | - /apps/flood-torrent/db:/flood-db 12 | - /DATA:/data 13 | environment: 14 | - PGID=1000 15 | - PUID=1000 16 | - TZ=Europe/Paris 17 | ports: 18 | - 49184:49184 19 | - 3000:3000 20 | image: wonderfall/rtorrent-flood:new 21 | restart: unless-stopped 22 | # networks: 23 | # - proxy 24 | # labels: 25 | # - "traefik.enable=true" 26 | # - "traefik.http.routers.torrent.entrypoints=http" 27 | # - "traefik.http.routers.torrent.rule=Host(`torrent.papamica.fr`)" 28 | # - "traefik.http.middlewares.torrent-https-redirect.redirectscheme.scheme=https" 29 | # - "traefik.http.routers.torrent.middlewares=torrent-https-redirect" 30 | # - "traefik.http.routers.torrent-secure.entrypoints=https" 31 | # - "traefik.http.routers.torrent-secure.rule=Host(`torrent.papamica.fr`)" 32 | # - "traefik.http.routers.torrent-secure.tls=true" 33 | # - "traefik.http.routers.torrent-secure.tls.certresolver=http" 34 | # - "traefik.docker.network=proxy" 35 | #networks: 36 | # proxy: 37 | # external: 38 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/jellyfin/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Jellyfin avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: "2" 6 | 7 | services: 8 | jellyfin: 9 | image: linuxserver/jellyfin 10 | container_name: streamplayer 11 | environment: 12 | - PUID=1000 13 | - PGID=1000 14 | - TZ=Europe/Paris 15 | # - UMASK_SET=022 #optional 16 | ports: 17 | - 8096:8096 18 | volumes: 19 | - /apps/streamplayer/config:/config 20 | - /DATA/SERIES:/data/tvshows 21 | - /DATA/FILMS:/data/movies 22 | # - /tmp:/transcode #optional 23 | # - /opt/vc/lib:/opt/vc/lib #optional 24 | # networks: 25 | # - proxy 26 | # labels: 27 | # - "traefik.enable=true" 28 | # - "traefik.http.routers.stream.entrypoints=http" 29 | # - "traefik.http.routers.stream.rule=Host(`stream.ndd.fr`)" 30 | # - "traefik.http.middlewares.stream-https-redirect.redirectscheme.scheme=https" 31 | # - "traefik.http.routers.stream.middlewares=stream-https-redirect" 32 | # - "traefik.http.routers.stream-secure.entrypoints=https" 33 | # - "traefik.http.routers.stream-secure.rule=Host(`stream.ndd.fr`)" 34 | # - "traefik.http.routers.stream-secure.tls=true" 35 | # - "traefik.http.routers.stream-secure.tls.certresolver=http" 36 | # - "traefik.http.services.stream-secure.loadbalancer.server.port=8096" 37 | # - "traefik.docker.network=proxy" 38 | # 39 | #networks: 40 | # proxy: 41 | # external: 42 | # name: proxy 43 | -------------------------------------------------------------------------------- /docker-compose/nextcloud/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Nextcloud avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | 6 | version: "2" 7 | services: 8 | nextcloud: 9 | image: wonderfall/nextcloud 10 | container_name: nextcloud 11 | depends_on: 12 | - nextcloud-db # If using MySQL 13 | # - nextcloud-redis # If using Redis 14 | environment: 15 | - UID=1000 16 | - GID=1000 17 | - UPLOAD_MAX_SIZE=20G 18 | - APC_SHM_SIZE=128M 19 | - OPCACHE_MEM_SIZE=128 20 | - CRON_PERIOD=15m 21 | - TZ=Europe/Paris 22 | - DOMAIN=nextcloud.ndd.fr 23 | - DB_TYPE=mysql 24 | - DB_NAME=nextcloud 25 | - DB_USER=nextcloud 26 | - DB_PASSWORD=supersecretpassword321 27 | - DB_HOST=nextcloud-db 28 | volumes: 29 | - /DATA/NEXTCLOUD:/data 30 | - /DATA/FILMS:/ORION/MULTIMEDIA/FILMS 31 | - /DATA/SERIES:/ORION/MULTIMEDIA/SERIES 32 | - /DATA/PROJETS:/ORION/PROJETS 33 | - /DATA/TECHNIQUES:/ORION/TECHNIQUES 34 | - /apps/nextcloud/config:/config 35 | - /apps/nextcloud/apps:/apps2 36 | - /apps/nextcloud/themes:/nextcloud/themes 37 | # networks: 38 | # - proxy 39 | # labels: 40 | # - "traefik.enable=true" 41 | # - "traefik.http.routers.nextcloud.entrypoints=http" 42 | # - "traefik.http.routers.nextcloud.rule=Host(`nextcloud.ndd.fr`)" 43 | # - "traefik.http.middlewares.nextcloud-https-redirect.redirectscheme.scheme=https" 44 | # - "traefik.http.routers.nextcloud.middlewares=nextcloud-https-redirect" 45 | # - "traefik.http.routers.nextcloud-secure.entrypoints=https" 46 | # - "traefik.http.routers.nextcloud-secure.rule=Host(`nextcloud.ndd.fr`)" 47 | # - "traefik.http.routers.nextcloud-secure.tls=true" 48 | # - "traefik.http.routers.nextcloud-secure.tls.certresolver=http" 49 | # - "traefik.docker.network=proxy" 50 | 51 | # If using MySQL 52 | nextcloud-db: 53 | image: mariadb 54 | container_name: nextcloud-mariadb 55 | volumes: 56 | - /apps/nextcloud/db:/var/lib/mysql 57 | environment: 58 | - MYSQL_ROOT_PASSWORD=supersecretpassword321 59 | - MYSQL_DATABASE=nextcloud 60 | - MYSQL_USER=nextcloud 61 | - MYSQL_PASSWORD=supersecretpassword321 62 | # networks: 63 | # - proxy 64 | 65 | # # If using Redis 66 | # nextcloud-redis: 67 | # image: redis:alpine 68 | # container_name: nextcloud-redis 69 | # volumes: 70 | # - /apps/nextcloud/redis:/data 71 | # networks: 72 | # - proxy 73 | 74 | #networks: 75 | # proxy: 76 | # external: 77 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/odoo/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Odoo avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | 6 | version: '2' 7 | services: 8 | postgresql: 9 | container_name: odoo-db 10 | image: 'bitnami/postgresql:11' 11 | environment: 12 | - ALLOW_EMPTY_PASSWORD=yes 13 | - TZ=Europe/Paris 14 | - PUID=1000 15 | - PGID=1000 16 | # volumes: 17 | # - /apps/odoo/db:/bitnami/postgresql 18 | restart: always 19 | networks: 20 | - proxy 21 | 22 | odoo: 23 | image: 'bitnami/odoo:13' 24 | container_name: odoo 25 | ports: 26 | - '8987:8069' 27 | - '3443:8071' 28 | environment: 29 | - ODOO_EMAIL=mail@ndd.fr 30 | - ODOO_PASSWORD=PASSWORD 31 | - SMTP_HOST=smtp.gmail.com 32 | - SMTP_PORT=587 33 | - SMTP_USER=your_email@gmail.com 34 | - SMTP_PASSWORD=your_password 35 | - SMTP_PROTOCOL=tls 36 | volumes: 37 | - /apps/odoo/data:/bitnami 38 | depends_on: 39 | - postgresql 40 | restart: always 41 | # networks: 42 | # - proxy 43 | # labels: 44 | # - "traefik.enable=true" 45 | # - "traefik.http.routers.odoo.entrypoints=http" 46 | # - "traefik.http.routers.odoo.rule=Host(`odoo.ndd.fr`)" 47 | # - "traefik.http.middlewares.odoo-https-redirect.redirectscheme.scheme=https" 48 | # - "traefik.http.routers.odoo.middlewares=odoo-https-redirect" 49 | # - "traefik.http.routers.odoo-secure.entrypoints=https" 50 | # - "traefik.http.routers.odoo-secure.rule=Host(`odoo.ndd.fr`)" 51 | # - "traefik.http.routers.odoo-secure.tls=true" 52 | # - "traefik.http.routers.odoo-secure.tls.certresolver=http" 53 | # - "traefik.docker.network=proxy" 54 | 55 | #networks: 56 | # proxy: 57 | # external: 58 | # name: proxy 59 | -------------------------------------------------------------------------------- /docker-compose/organizr/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Organizr avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | 6 | version: "2" 7 | services: 8 | organizr: 9 | image: organizrtools/organizr-v2 10 | container_name: organizr 11 | environment: 12 | - PUID=1000 13 | - PGID=1000 14 | - TZ=Europe/Paris 15 | volumes: 16 | - /apps/organizr/config:/config 17 | ports: 18 | - 9983:80 19 | restart: unless-stopped 20 | # networks: 21 | # - proxy 22 | # labels: 23 | # - "traefik.enable=true" 24 | # - "traefik.http.routers.organizr.entrypoints=http" 25 | # - "traefik.http.routers.organizr.rule=Host(`app.ndd.fr`)" 26 | # - "traefik.http.middlewares.organizr-https-redirect.redirectscheme.scheme=https" 27 | # - "traefik.http.routers.organizr.middlewares=organizr-https-redirect" 28 | # - "traefik.http.routers.organizr-secure.entrypoints=https" 29 | # - "traefik.http.routers.organizr-secure.rule=Host(`app.ndd.fr`)" 30 | # - "traefik.http.routers.organizr-secure.tls=true" 31 | # - "traefik.http.routers.organizr-secure.tls.certresolver=http" 32 | # - "traefik.docker.network=proxy" 33 | # 34 | #networks: 35 | # proxy: 36 | # external: 37 | # name: proxy 38 | 39 | -------------------------------------------------------------------------------- /docker-compose/owncloud/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour OwnCloud avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: "2" 6 | services: 7 | owncloud: 8 | image: owncloud/server 9 | container_name: owncloud 10 | restart: always 11 | ports: 12 | - 8745:8080 13 | depends_on: 14 | - db 15 | - redis 16 | environment: 17 | - OWNCLOUD_DOMAIN=owncloud.ndd.fr 18 | - OWNCLOUD_DB_TYPE=mysql 19 | - OWNCLOUD_DB_NAME=owncloud 20 | - OWNCLOUD_DB_USERNAME=owncloud 21 | - OWNCLOUD_DB_PASSWORD=owncloud123 22 | - OWNCLOUD_DB_HOST=db 23 | - OWNCLOUD_ADMIN_USERNAME=USER 24 | - OWNCLOUD_ADMIN_PASSWORD=PASSWORD 25 | - OWNCLOUD_MYSQL_UTF8MB4=true 26 | - OWNCLOUD_REDIS_ENABLED=true 27 | - OWNCLOUD_REDIS_HOST=redis 28 | volumes: 29 | - /DATA:/mnt/data 30 | # networks: 31 | # - proxy 32 | # labels: 33 | # - "traefik.enable=true" 34 | # - "traefik.http.routers.owncloud.entrypoints=http" 35 | # - "traefik.http.routers.owncloud.rule=Host(`owncloud.ndd.fr`)" 36 | # - "traefik.http.middlewares.owncloud-https-redirect.redirectscheme.scheme=https" 37 | # - "traefik.http.routers.owncloud.middlewares=owncloud-https-redirect" 38 | # - "traefik.http.routers.owncloud-secure.entrypoints=https" 39 | # - "traefik.http.routers.owncloud-secure.rule=Host(`owncloud.ndd.fr`)" 40 | # - "traefik.http.routers.owncloud-secure.tls=true" 41 | # - "traefik.http.routers.owncloud-secure.tls.certresolver=http" 42 | # - "traefik.docker.network=proxy" 43 | # 44 | db: 45 | image: webhippie/mariadb:latest 46 | restart: always 47 | container_name: owncloud-db 48 | environment: 49 | - MARIADB_ROOT_PASSWORD=owncloud 50 | - MARIADB_USERNAME=owncloud 51 | - MARIADB_PASSWORD=owncloud123 52 | - MARIADB_DATABASE=owncloud 53 | - MARIADB_MAX_ALLOWED_PACKET=128M 54 | - MARIADB_INNODB_LOG_FILE_SIZE=64M 55 | volumes: 56 | - /apps/owncloud/db:/var/lib/mysql 57 | - /apps/owncloud/backup:/var/lib/backup 58 | # networks: 59 | # - proxy 60 | 61 | redis: 62 | image: webhippie/redis:latest 63 | restart: always 64 | container_name: owncloud-redis 65 | environment: 66 | - REDIS_DATABASES=1 67 | volumes: 68 | - /apps/owncloud/redis:/var/lib/redis 69 | # networks: 70 | # - proxy 71 | #networks: 72 | # proxy: 73 | # external: 74 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/plex-tools/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour les outils Plex avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | 7 | services: 8 | influxdb: 9 | hostname: influxdb 10 | container_name: varken-influxdb 11 | image: influxdb 12 | # networks: 13 | # - proxy 14 | volumes: 15 | - /apps/varken/db:/var/lib/influxdb 16 | restart: unless-stopped 17 | 18 | varken: 19 | hostname: varken 20 | container_name: varken 21 | image: boerderij/varken 22 | # networks: 23 | # - proxy 24 | volumes: 25 | - /apps/varken/config:/config 26 | environment: 27 | - DEBUG=True 28 | - TZ=Europe/Paris 29 | - VRKN_GLOBAL_SONARR_SERVER_IDS=1,2 30 | - VRKN_GLOBAL_RADARR_SERVER_IDS=1,2 31 | # - VRKN_GLOBAL_LIDARR_SERVER_IDS=false 32 | # - VRKN_GLOBAL_TAUTULLI_SERVER_IDS=1 33 | - VRKN_GLOBAL_OMBI_SERVER_IDS=1 34 | # - VRKN_GLOBAL_SICKCHILL_SERVER_IDS=false 35 | # - VRKN_GLOBAL_UNIFI_SERVER_IDS=false 36 | # - VRKN_GLOBAL_MAXMIND_LICENSE_KEY=xxxxxxxxxxxxxxxx 37 | - VRKN_INFLUXDB_URL=172.18.0.16 38 | - VRKN_INFLUXDB_PORT=8086 39 | - VRKN_INFLUXDB_SSL=false 40 | - VRKN_INFLUXDB_VERIFY_SSL=false 41 | - VRKN_INFLUXDB_USERNAME=root 42 | - VRKN_INFLUXDB_PASSWORD=root 43 | # - VRKN_TAUTULLI_1_URL=172.18.0.10:8181 44 | # - VRKN_TAUTULLI_1_FALLBACK_IP=1.1.1.1 45 | # - VRKN_TAUTULLI_1_APIKEY=d6263ec6a8a44487bcff430a381a35e8 46 | # - VRKN_TAUTULLI_1_SSL=false 47 | # - VRKN_TAUTULLI_1_VERIFY_SSL=false 48 | # - VRKN_TAUTULLI_1_GET_ACTIVITY=true 49 | # - VRKN_TAUTULLI_1_GET_ACTIVITY_RUN_SECONDS=30 50 | # - VRKN_TAUTULLI_1_GET_STATS=true 51 | # - VRKN_TAUTULLI_1_GET_STATS_RUN_SECONDS=3600 52 | - VRKN_SONARR_1_URL=sonarr1.domain.tld:8989 53 | - VRKN_SONARR_1_APIKEY=xxxxxxxxxxxxxxxx 54 | - VRKN_SONARR_1_SSL=false 55 | - VRKN_SONARR_1_VERIFY_SSL=false 56 | - VRKN_SONARR_1_MISSING_DAYS=7 57 | - VRKN_SONARR_1_MISSING_DAYS_RUN_SECONDS=300 58 | - VRKN_SONARR_1_FUTURE_DAYS=1 59 | - VRKN_SONARR_1_FUTURE_DAYS_RUN_SECONDS=300 60 | - VRKN_SONARR_1_QUEUE=true 61 | - VRKN_SONARR_1_QUEUE_RUN_SECONDS=300 62 | - VRKN_SONARR_2_URL=sonarr2.domain.tld:8989 63 | - VRKN_SONARR_2_APIKEY=yyyyyyyyyyyyyyyy 64 | - VRKN_SONARR_2_SSL=false 65 | - VRKN_SONARR_2_VERIFY_SSL=false 66 | - VRKN_SONARR_2_MISSING_DAYS=7 67 | - VRKN_SONARR_2_MISSING_DAYS_RUN_SECONDS=300 68 | - VRKN_SONARR_2_FUTURE_DAYS=1 69 | - VRKN_SONARR_2_FUTURE_DAYS_RUN_SECONDS=300 70 | - VRKN_SONARR_2_QUEUE=true 71 | - VRKN_SONARR_2_QUEUE_RUN_SECONDS=300 72 | - VRKN_RADARR_1_URL=radarr1.domain.tld 73 | - VRKN_RADARR_1_APIKEY=xxxxxxxxxxxxxxxx 74 | - VRKN_RADARR_1_SSL=false 75 | - VRKN_RADARR_1_VERIFY_SSL=false 76 | - VRKN_RADARR_1_QUEUE=true 77 | - VRKN_RADARR_1_QUEUE_RUN_SECONDS=300 78 | - VRKN_RADARR_1_GET_MISSING=true 79 | - VRKN_RADARR_1_GET_MISSING_RUN_SECONDS=300 80 | - VRKN_RADARR_2_URL=radarr2.domain.tld 81 | - VRKN_RADARR_2_APIKEY=yyyyyyyyyyyyyyyy 82 | - VRKN_RADARR_2_SSL=false 83 | - VRKN_RADARR_2_VERIFY_SSL=false 84 | - VRKN_RADARR_2_QUEUE=true 85 | - VRKN_RADARR_2_QUEUE_RUN_SECONDS=300 86 | - VRKN_RADARR_2_GET_MISSING=true 87 | - VRKN_RADARR_2_GET_MISSING_RUN_SECONDS=300 88 | # - VRKN_LIDARR_1_URL=lidarr1.domain.tld:8686 89 | # - VRKN_LIDARR_1_APIKEY=xxxxxxxxxxxxxxxx 90 | # - VRKN_LIDARR_1_SSL=false 91 | # - VRKN_LIDARR_1_VERIFY_SSL=false 92 | # - VRKN_LIDARR_1_MISSING_DAYS=30 93 | # - VRKN_LIDARR_1_MISSING_DAYS_RUN_SECONDS=300 94 | # - VRKN_LIDARR_1_FUTURE_DAYS=30 95 | # - VRKN_LIDARR_1_FUTURE_DAYS_RUN_SECONDS=300 96 | # - VRKN_LIDARR_1_QUEUE=true 97 | # - VRKN_LIDARR_1_QUEUE_RUN_SECONDS=300 98 | # - VRKN_OMBI_1_URL=ombi.domain.tld 99 | # - VRKN_OMBI_1_APIKEY=xxxxxxxxxxxxxxxx 100 | # - VRKN_OMBI_1_SSL=false 101 | # - VRKN_OMBI_1_VERIFY_SSL=false 102 | # - VRKN_OMBI_1_GET_REQUEST_TYPE_COUNTS=true 103 | # - VRKN_OMBI_1_REQUEST_TYPE_RUN_SECONDS=300 104 | # - VRKN_OMBI_1_GET_REQUEST_TOTAL_COUNTS=true 105 | # - VRKN_OMBI_1_REQUEST_TOTAL_RUN_SECONDS=300 106 | # - VRKN_OMBI_1_GET_ISSUE_STATUS_COUNTS=true 107 | # - VRKN_OMBI_1_ISSUE_STATUS_RUN_SECONDS=300 108 | depends_on: 109 | - influxdb 110 | restart: unless-stopped 111 | # labels: 112 | # - "traefik.enable=true" 113 | # - "traefik.http.routers.varken.entrypoints=http" 114 | # - "traefik.http.routers.varken.rule=Host(`varken.ndd.fr`)" 115 | # - "traefik.http.middlewares.varken-https-redirect.redirectscheme.scheme=https" 116 | # - "traefik.http.routers.varken.middlewares=varken-https-redirect" 117 | # - "traefik.http.routers.varken-secure.entrypoints=https" 118 | # - "traefik.http.routers.varken-secure.rule=Host(`varken.ndd.fr`)" 119 | # - "traefik.http.routers.varken-secure.tls=true" 120 | # - "traefik.http.routers.varken-secure.tls.certresolver=http" 121 | # - "traefik.docker.network=proxy" 122 | 123 | grafana: 124 | hostname: grafana 125 | container_name: varken-grafana 126 | image: grafana/grafana 127 | # networks: 128 | # - proxy 129 | ports: 130 | - 3001:3000 131 | # labels: 132 | # - "traefik.enable=true" 133 | # - "traefik.http.routers.grafana.entrypoints=http" 134 | # - "traefik.http.routers.grafana.rule=Host(`grafana.ndd.fr`)" 135 | # - "traefik.http.middlewares.grafana-https-redirect.redirectscheme.scheme=https" 136 | # - "traefik.http.routers.grafana.middlewares=grafana-https-redirect" 137 | # - "traefik.http.routers.grafana-secure.entrypoints=https" 138 | # - "traefik.http.routers.grafana-secure.rule=Host(`grafana.ndd.fr`)" 139 | # - "traefik.http.routers.grafana-secure.tls=true" 140 | # - "traefik.http.routers.grafana-secure.tls.certresolver=http" 141 | # - "traefik.http.services.grafana-secure.loadbalancer.server.port=3000" 142 | # - "traefik.docker.network=proxy" 143 | volumes: 144 | - /apps/varken/grafana:/config 145 | environment: 146 | - GF_PATHS_DATA=/config/data 147 | - GF_PATHS_LOGS=/config/logs 148 | - GF_PATHS_PLUGINS=/config/plugins 149 | - GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-worldmap-panel 150 | depends_on: 151 | - influxdb 152 | - varken 153 | restart: unless-stopped 154 | 155 | 156 | nzbget: 157 | image: linuxserver/nzbget 158 | container_name: nzbget 159 | volumes: 160 | - /apps/nzbget/config:/config 161 | - /DATA:/downloads 162 | restart: always 163 | environment: 164 | - TZ=Europe/Paris 165 | ports: 166 | - 6789:6789 167 | # networks: 168 | # - proxy 169 | # labels: 170 | # - "traefik.enable=true" 171 | # - "traefik.http.routers.nzbget.entrypoints=http" 172 | # - "traefik.http.routers.nzbget.rule=Host(`nzbget.ndd.fr`)" 173 | # - "traefik.http.middlewares.nzbget-https-redirect.redirectscheme.scheme=https" 174 | # - "traefik.http.routers.nzbget.middlewares=nzbget-https-redirect" 175 | # - "traefik.http.routers.nzbget-secure.entrypoints=https" 176 | # - "traefik.http.routers.nzbget-secure.rule=Host(`nzbget.ndd.fr`)" 177 | # - "traefik.http.routers.nzbget-secure.tls=true" 178 | # - "traefik.http.routers.nzbget-secure.tls.certresolver=http" 179 | # - "traefik.http.services.nzbget-secure.loadbalancer.server.port=6789" 180 | # - "traefik.docker.network=proxy" 181 | 182 | sonarr: 183 | image: linuxserver/sonarr 184 | container_name: sonarr 185 | depends_on: 186 | - nzbget 187 | volumes: 188 | - /apps/sonarr/config:/config 189 | - /DATA/DOWNLOADS:/downloads 190 | - /DATA/SERIES:/tv 191 | environment: 192 | - TZ=Europe/Paris 193 | ports: 194 | - 8989:8989 195 | # networks: 196 | # - proxy 197 | # labels: 198 | # - "traefik.enable=true" 199 | # - "traefik.http.routers.sonarr.entrypoints=http" 200 | # - "traefik.http.routers.sonarr.rule=Host(`sonarr.ndd.fr`)" 201 | # - "traefik.http.middlewares.sonarr-https-redirect.redirectscheme.scheme=https" 202 | # - "traefik.http.routers.sonarr.middlewares=sonarr-https-redirect" 203 | # - "traefik.http.routers.sonarr-secure.entrypoints=https" 204 | # - "traefik.http.routers.sonarr-secure.rule=Host(`sonarr.ndd.fr`)" 205 | # - "traefik.http.routers.sonarr-secure.tls=true" 206 | # - "traefik.http.routers.sonarr-secure.tls.certresolver=http" 207 | # - "traefik.http.services.sonarr-secure.loadbalancer.server.port=8989" 208 | # - "traefik.docker.network=proxy" 209 | 210 | radarr: 211 | image: linuxserver/radarr 212 | container_name: radarr 213 | depends_on: 214 | - nzbget 215 | volumes: 216 | - /apps/radarr/config:/config 217 | - /DATA/DOWNLOADS:/downloads 218 | - /DATA/FILMS:/movies 219 | environment: 220 | - TZ=Europe/Paris 221 | - PUID=1000 222 | - PGID=1000 223 | ports: 224 | - 7878:7878 225 | # networks: 226 | # - proxy 227 | # labels: 228 | # - "traefik.enable=true" 229 | # - "traefik.http.routers.radarr.entrypoints=http" 230 | # - "traefik.http.routers.radarr.rule=Host(`radarr.ndd.fr`)" 231 | # - "traefik.http.middlewares.radarr-https-redirect.redirectscheme.scheme=https" 232 | # - "traefik.http.routers.radarr.middlewares=radarr-https-redirect" 233 | # - "traefik.http.routers.radarr-secure.entrypoints=https" 234 | # - "traefik.http.routers.radarr-secure.rule=Host(`radarr.ndd.fr`)" 235 | # - "traefik.http.routers.radarr-secure.tls=true" 236 | # - "traefik.http.routers.radarr-secure.tls.certresolver=http" 237 | # - "traefik.http.services.radarr-secure.loadbalancer.server.port=7878" 238 | # - "traefik.docker.network=proxy" 239 | 240 | ombi: 241 | image: linuxserver/ombi 242 | container_name: ombi 243 | environment: 244 | - PUID=1000 245 | - PGID=1000 246 | - TZ=Europe/Paris 247 | volumes: 248 | - /apps/ombi/config:/config 249 | ports: 250 | - 3579:3579 251 | restart: unless-stopped 252 | # networks: 253 | # - proxy 254 | # labels: 255 | # - "traefik.enable=true" 256 | # - "traefik.http.routers.ombi.entrypoints=http" 257 | # - "traefik.http.routers.ombi.rule=Host(`ombi.ndd.fr`)" 258 | # - "traefik.http.middlewares.ombi-https-redirect.redirectscheme.scheme=https" 259 | # - "traefik.http.routers.ombi.middlewares=ombi-https-redirect" 260 | # - "traefik.http.routers.ombi-secure.entrypoints=https" 261 | # - "traefik.http.routers.ombi-secure.rule=Host(`ombi.ndd.fr`)" 262 | # - "traefik.http.routers.ombi-secure.tls=true" 263 | # - "traefik.http.routers.ombi-secure.tls.certresolver=http" 264 | # - "traefik.http.services.ombi-secure.loadbalancer.server.port=3579" 265 | # - "traefik.docker.network=proxy" 266 | 267 | jackett: 268 | image: linuxserver/jackett 269 | container_name: jackett 270 | environment: 271 | - PUID=1000 272 | - PGID=1000 273 | - TZ=Europe/Paris 274 | volumes: 275 | - /apps/jackett/config:/config 276 | - /DATA:/downloads 277 | ports: 278 | - 9117:9117 279 | restart: unless-stopped 280 | # networks: 281 | # - proxy 282 | # labels: 283 | # - "traefik.enable=true" 284 | # - "traefik.http.routers.jackett.entrypoints=http" 285 | # - "traefik.http.routers.jackett.rule=Host(`jackett.ndd.fr`)" 286 | # - "traefik.http.middlewares.jackett-https-redirect.redirectscheme.scheme=https" 287 | # - "traefik.http.routers.jackett.middlewares=jackett-https-redirect" 288 | # - "traefik.http.routers.jackett-secure.entrypoints=https" 289 | # - "traefik.http.routers.jackett-secure.rule=Host(`jackett.ndd.fr`)" 290 | # - "traefik.http.routers.jackett-secure.tls=true" 291 | # - "traefik.http.routers.jackett-secure.tls.certresolver=http" 292 | # - "traefik.http.services.jackett-secure.loadbalancer.server.port=9117" 293 | # - "traefik.docker.network=proxy" 294 | 295 | tautulli: 296 | image: linuxserver/tautulli 297 | container_name: tautulli 298 | environment: 299 | - PUID=1000 300 | - PGID=1000 301 | - TZ=Europe/Paris 302 | volumes: 303 | - /apps/tautulli/config:/config 304 | - /apps/tautulli/logs:/logs 305 | ports: 306 | - 8181:8181 307 | restart: unless-stopped 308 | # networks: 309 | # - proxy 310 | # labels: 311 | # - "traefik.enable=true" 312 | # - "traefik.http.routers.tautulli.entrypoints=http" 313 | # - "traefik.http.routers.tautulli.rule=Host(`tautulli.ndd.fr`)" 314 | # - "traefik.http.middlewares.tautulli-https-redirect.redirectscheme.scheme=https" 315 | # - "traefik.http.routers.tautulli.middlewares=tautulli-https-redirect" 316 | # - "traefik.http.routers.tautulli-secure.entrypoints=https" 317 | # - "traefik.http.routers.tautulli-secure.rule=Host(`tautulli.ndd.fr`)" 318 | # - "traefik.http.routers.tautulli-secure.tls=true" 319 | # - "traefik.http.routers.tautulli-secure.tls.certresolver=http" 320 | # - "traefik.http.services.tautulli-secure.loadbalancer.server.port=8181" 321 | # - "traefik.docker.network=proxy" 322 | 323 | #networks: 324 | # proxy: 325 | # external: 326 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/plex/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Plex avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: "2" 6 | services: 7 | plex: 8 | image: linuxserver/plex 9 | container_name: plex 10 | environment: 11 | - PUID=1000 12 | - PGID=1000 13 | - VERSION=docker 14 | - UMASK_SET=022 #optional 15 | - PLEX_CLAIM= #code claim 16 | ports: 17 | - 32400:32400/tcp 18 | - 3005:3005/tcp 19 | - 8324:8324/tcp 20 | - 32469:32469/tcp 21 | - 1900:1900/udp 22 | - 32410:32410/udp 23 | - 32412:32412/udp 24 | - 32413:32413/udp 25 | - 32414:32414/udp 26 | volumes: 27 | - /apps/plex/config:/config 28 | - /DATA/SERIES:/tv 29 | - /DATA/FILMS:/movies 30 | restart: unless-stopped 31 | # labels: 32 | # - "traefik.enable=true" 33 | # - "traefik.http.routers.plex.entrypoints=http" 34 | # - "traefik.http.routers.plex.rule=Host(`plex.ndd.fr`)" 35 | # - "traefik.http.middlewares.plex-https-redirect.redirectscheme.scheme=https" 36 | # - "traefik.http.routers.plex.middlewares=plex-https-redirect" 37 | # - "traefik.http.routers.plex-secure.entrypoints=https" 38 | # - "traefik.http.routers.plex-secure.rule=Host(`plex.ndd.fr`)" 39 | # - "traefik.http.routers.plex-secure.tls=true" 40 | # - "traefik.http.routers.plex-secure.tls.certresolver=http" 41 | # - "traefik.http.services.plex-secure.loadbalancer.server.port=32400" 42 | # - "traefik.docker.network=proxy" 43 | # networks: 44 | # - proxy 45 | # 46 | #networks: 47 | # proxy: 48 | # external: 49 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/portainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Portainer avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | 7 | services: 8 | portainer: 9 | image: portainer/portainer:latest 10 | container_name: portainer 11 | restart: unless-stopped 12 | security_opt: 13 | - no-new-privileges:true 14 | # networks: 15 | # - proxy 16 | volumes: 17 | - /etc/localtime:/etc/localtime:ro 18 | - /var/run/docker.sock:/var/run/docker.sock:ro 19 | - ./data:/data 20 | # labels: 21 | # - "traefik.enable=true" 22 | # - "traefik.http.routers.portainer.entrypoints=http" 23 | # - "traefik.http.routers.portainer.rule=Host(`portainer.ndd.fr`)" 24 | # - "traefik.http.middlewares.portainer-https-redirect.redirectscheme.scheme=https" 25 | # - "traefik.http.routers.portainer.middlewares=portainer-https-redirect" 26 | # - "traefik.http.routers.portainer-secure.entrypoints=https" 27 | # - "traefik.http.routers.portainer-secure.rule=Host(`portainer.ndd.fr`)" 28 | # - "traefik.http.routers.portainer-secure.tls=true" 29 | # - "traefik.http.routers.portainer-secure.tls.certresolver=http" 30 | # - "traefik.http.routers.portainer-secure.service=portainer" 31 | # - "traefik.http.services.portainer.loadbalancer.server.port=9000" 32 | # - "traefik.docker.network=proxy" 33 | # 34 | #networks: 35 | # proxy: 36 | # external: true -------------------------------------------------------------------------------- /docker-compose/rutorrent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour RuTorrent avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | services: 7 | rutorrent-autodl: 8 | container_name: rutorrent 9 | volumes: 10 | - /apps/rutorrent/config:/config 11 | - /DATA:/downloads 12 | environment: 13 | - PGID=1000 14 | - PUID=1000 15 | - TZ=Europe/Paris 16 | ports: 17 | - 8780:80 18 | - 5000:5000 19 | - 51413:51413 20 | - 6881:6881/udp 21 | image: horjulf/rutorrent-autodl 22 | restart: unless-stopped 23 | # networks: 24 | # - proxy 25 | # labels: 26 | # - "traefik.enable=true" 27 | # - "traefik.http.routers.rutorrent.entrypoints=http" 28 | # - "traefik.http.routers.rutorrent.rule=Host(`rutorrent.ndd.fr`)" 29 | # - "traefik.http.middlewares.rutorrent-https-redirect.redirectscheme.scheme=https" 30 | # - "traefik.http.routers.rutorrent.middlewares=rutorrent-https-redirect" 31 | # - "traefik.http.routers.rutorrent-secure.entrypoints=https" 32 | # - "traefik.http.routers.rutorrent-secure.rule=Host(`rutorrent.ndd.fr`)" 33 | # - "traefik.http.routers.rutorrent-secure.tls=true" 34 | # - "traefik.http.routers.rutorrent-secure.tls.certresolver=http" 35 | # - "traefik.docker.network=proxy" 36 | # - "traefik.http.middlewares.rutorrent-auth.basicauth.users= #IDENTIFIANT:MDP (SHA) 37 | ## - "traefik.http.middlewares.rutorrent-secure.basicauth.removeheader=true" 38 | # - "traefik.http.routers.rutorrent-secure.middlewares=rutorrent-auth" 39 | # 40 | # 41 | # 42 | #networks: 43 | # proxy: 44 | # external: 45 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/seafile/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Seafile avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | 7 | services: 8 | seafile: 9 | environment: 10 | - SEAFILE_NAME='Seafile' 11 | - SEAFILE_ADDRESS=seafile.ndd.fr 12 | - SEAFILE_ADMIN=admin@ndd.fr 13 | - SEAFILE_ADMIN_PW=PAPAMICA 14 | volumes: 15 | - '/DATA:/seafile' 16 | image: m3adow/seafile 17 | restart: always 18 | ports: 19 | - 8000:8000 20 | # labels: 21 | # - "traefik.enable=true" 22 | # - "traefik.http.routers.seafile.entrypoints=http" 23 | # - "traefik.http.routers.seafile.rule=Host(`seafile.ndd.fr`)" 24 | # - "traefik.http.middlewares.seafile-https-redirect.redirectscheme.scheme=https" 25 | # - "traefik.http.routers.seafile.middlewares=seafile-https-redirect" 26 | # - "traefik.http.routers.seafile-secure.entrypoints=https" 27 | # - "traefik.http.routers.seafile-secure.rule=Host(`seafile.ndd.fr`)" 28 | # - "traefik.http.routers.seafile-secure.tls=true" 29 | # - "traefik.http.routers.seafile-secure.tls.certresolver=http" 30 | # - "traefik.http.services.seafile-secure.loadbalancer.server.port=8000" 31 | # - "traefik.docker.network=proxy" 32 | # networks: 33 | # - proxy 34 | # 35 | #networks: 36 | # proxy: 37 | # external: 38 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/teamspeak/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour TeamSpeak et Sinusbot avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | services: 7 | sinusbot: 8 | image: galexrt/sinusbot:latest 9 | restart: always 10 | ports: 11 | - 8087:8087 12 | # labels: 13 | # - "traefik.enable=true" 14 | # - "traefik.http.routers.sinusbot.entrypoints=http" 15 | # - "traefik.http.routers.sinusbot.rule=Host(`sinusbot.ndd.fr`)" 16 | # - "traefik.http.middlewares.sinusbot-https-redirect.redirectscheme.scheme=https" 17 | # - "traefik.http.routers.sinusbot.middlewares=sinusbot-https-redirect" 18 | # - "traefik.http.routers.sinusbot-secure.entrypoints=https" 19 | # - "traefik.http.routers.sinusbot-secure.rule=Host(`sinusbot.ndd.fr`)" 20 | # - "traefik.http.routers.sinusbot-secure.tls=true" 21 | # - "traefik.http.routers.sinusbot-secure.tls.certresolver=http" 22 | # - "traefik.docker.network=proxy" 23 | # networks: 24 | # - proxy 25 | volumes: 26 | - /apps/sinusbot/scripts:/sinusbot/scripts 27 | - /apps/sinusbot/data:/sinusbot/data 28 | 29 | teamspeak: 30 | image: mbentley/teamspeak 31 | restart: always 32 | container_name: teamspeak 33 | volumes: 34 | - /apps/teamspeak/data:/data 35 | ports: 36 | - 9987:9987/udp 37 | - 10011:10011 38 | - 30033:30033 39 | environment: 40 | - UID=1000 41 | - GID=1000 42 | - TS3SERVER_LICENSE=accept 43 | # labels: 44 | # - traefik.enable=true 45 | # - traefik.http.routers.ts.rule=Host(`ts.ndd.fr`) 46 | # - traefik.http.routers.ts.entryPoints=http 47 | # - traefik.ts.port=9987 48 | # - traefik.ts2.port=30033 49 | # - traefik.query.port=10011 50 | # networks: 51 | # - proxy 52 | ts3viewer: 53 | image: jotschi/ts3viewer 54 | restart: always 55 | volumes: 56 | - /apps/teamspeak/viewer:/var/www/html/ 57 | environment: 58 | - PUID=1000 59 | - PGID=1000 60 | - TS_PORT=10011 61 | - TS_HOST=172.18.0.6 62 | - TS_SERVER_PORT=9987 63 | - TS_VIEWER_LIGHT_MODE="false" 64 | - TS_VIEWER_CACHE_TIME="20" 65 | # - TS_QUERY_LOGIN="LOGIN_NAME" 66 | # - TS_QUERY_PASS="PASSWORD" 67 | # networks: 68 | # - proxy 69 | # labels: 70 | # - "traefik.enable=true" 71 | # - "traefik.http.routers.ts3viewer.entrypoints=http" 72 | # - "traefik.http.routers.ts3viewer.rule=Host(`ts3viewer.ndd.fr`)" 73 | # - "traefik.http.middlewares.ts3viewer-https-redirect.redirectscheme.scheme=https" 74 | # - "traefik.http.routers.ts3viewer.middlewares=ts3viewer-https-redirect" 75 | # - "traefik.http.routers.ts3viewer-secure.entrypoints=https" 76 | # - "traefik.http.routers.ts3viewer-secure.rule=Host(`ts3viewer.ndd.fr`)" 77 | # - "traefik.http.routers.ts3viewer-secure.tls=true" 78 | # - "traefik.http.routers.ts3viewer-secure.tls.certresolver=http" 79 | # - "traefik.docker.network=proxy" 80 | 81 | 82 | #networks: 83 | # proxy: 84 | # external: 85 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/traefik/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Traefik 2 | 3 | #By PAPAMICA 4 | version: '2' 5 | 6 | services: 7 | traefik: 8 | image: traefik:v2.0 9 | container_name: traefik 10 | restart: unless-stopped 11 | security_opt: 12 | - no-new-privileges:true 13 | networks: 14 | - proxy 15 | ports: 16 | - 80:80 17 | - 443:443 18 | volumes: 19 | - /etc/localtime:/etc/localtime:ro 20 | - /var/run/docker.sock:/var/run/docker.sock:ro 21 | - ./data/traefik.yml:/traefik.yml:ro 22 | - ./data/acme.json:/acme.json 23 | labels: 24 | - "traefik.enable=true" 25 | - "traefik.http.routers.traefik.entrypoints=http" 26 | - "traefik.http.routers.traefik.rule=Host(`traefik.ndd.fr`)" 27 | - "traefik.http.middlewares.traefik-auth.basicauth.users=USER:{SHA}MDP" 28 | - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" 29 | - "traefik.http.routers.traefik.middlewares=traefik-https-redirect" 30 | - "traefik.http.routers.traefik-secure.entrypoints=https" 31 | - "traefik.http.routers.traefik-secure.rule=Host(`traefik.ndd.fr`)" 32 | - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" 33 | - "traefik.http.routers.traefik-secure.tls=true" 34 | - "traefik.http.routers.traefik-secure.tls.certresolver=http" 35 | - "traefik.http.routers.traefik-secure.service=api@internal" 36 | 37 | networks: 38 | proxy: 39 | external: true -------------------------------------------------------------------------------- /docker-compose/vscode/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour VSCode avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | 7 | services: 8 | postgres: 9 | container_name: vscode 10 | image: codercom/code-server 11 | volumes: 12 | - /apps:/home/coder/project 13 | - /DATA/PROJETS:/home/coder/PROJETS 14 | restart: always 15 | environment: 16 | - PASSWORD=PAPAMICA 17 | # networks: 18 | # - proxy 19 | # labels: 20 | # - "traefik.enable=true" 21 | # - "traefik.http.routers.vscode.entrypoints=http" 22 | # - "traefik.http.routers.vscode.rule=Host(`vscode.ndd.fr`)" 23 | # - "traefik.http.middlewares.vscode-https-redirect.redirectscheme.scheme=https" 24 | # - "traefik.http.routers.vscode.middlewares=vscode-https-redirect" 25 | # - "traefik.http.routers.vscode-secure.entrypoints=https" 26 | # - "traefik.http.routers.vscode-secure.rule=Host(`vscode.ndd.fr`)" 27 | # - "traefik.http.routers.vscode-secure.tls=true" 28 | # - "traefik.http.routers.vscode-secure.tls.certresolver=http" 29 | # - "traefik.http.services.vscode-secure.loadbalancer.server.port=8080" 30 | # - "traefik.docker.network=proxy" 31 | # 32 | #networks: 33 | # proxy: 34 | # external: 35 | # name: proxy 36 | -------------------------------------------------------------------------------- /docker-compose/website-html/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Website-html avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | services: 7 | web: 8 | image: lavoweb/php-5.6 9 | container_name: website 10 | volumes: 11 | - /apps/website/html:/var/www/html 12 | ports: 13 | - 80:80 14 | # networks: 15 | # - proxy 16 | # labels: 17 | # - "traefik.enable=true" 18 | # - "traefik.http.routers.website.entrypoints=http" 19 | # - "traefik.http.routers.website.rule=Host(`csgo.ndd.fr`)" 20 | # - "traefik.http.middlewares.website-https-redirect.redirectscheme.scheme=https" 21 | # - "traefik.http.routers.website.middlewares=csgo-https-redirect" 22 | # - "traefik.http.routers.website-secure.entrypoints=https" 23 | # - "traefik.http.routers.website-secure.rule=Host(`csgo.ndd.fr`)" 24 | # - "traefik.http.routers.website-secure.tls=true" 25 | # - "traefik.http.routers.website-secure.tls.certresolver=http" 26 | # - "traefik.docker.network=proxy" 27 | # 28 | #networks: 29 | # proxy: 30 | # external: 31 | # name: proxy -------------------------------------------------------------------------------- /docker-compose/website-wordpress/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Docker-compose pour Website-Wordpress avec le support de Traefik 2 | # Pour Traefik, pensez a décommenter les lignes networks et labels. 3 | 4 | #By PAPAMICA 5 | version: '2' 6 | services: 7 | mariadb: 8 | image: 'bitnami/mariadb' 9 | container_name: site-wp-db 10 | volumes: 11 | - /apps/site/portfolio/db:/bitnami' 12 | environment: 13 | - MARIADB_USER=wordpress 14 | - MARIADB_DATABASE=wordpress 15 | - MARIADB_ROOT_PASSWORD=wordpress1309 16 | - ALLOW_EMPTY_PASSWORD=yes 17 | networks: 18 | - proxy 19 | 20 | wordpress: 21 | image: 'bitnami/wordpress' 22 | volumes: 23 | - '/apps/site/portfolio/wp:/bitnami' 24 | container_name: site-wp 25 | depends_on: 26 | - mariadb 27 | environment: 28 | - MARIADB_HOST=site-wp-db 29 | - MARIADB_PORT_NUMBER=3306 30 | - WORDPRESS_DATABASE_USER=wordpress 31 | - WORDPRESS_DATABASE_NAME=wordpress 32 | - ALLOW_EMPTY_PASSWORD=yes 33 | - WORDPRESS_USERNAME=PAPAMICA 34 | - WORDPRESS_PASSWORD=mdp1309 35 | - WORDPRESS_EMAIL=admin@ndd.fr 36 | ports: 37 | - 80:80 38 | # networks: 39 | # - proxy 40 | # labels: 41 | # - "traefik.enable=true" 42 | # - "traefik.http.routers.portfolio.entrypoints=http" 43 | # - "traefik.http.routers.portfolio.rule=Host(`portfolio.ndd.fr`)" 44 | # - "traefik.http.middlewares.portfolio-https-redirect.redirectscheme.scheme=https" 45 | # - "traefik.http.routers.portfolio.middlewares=portfolio-https-redirect" 46 | # - "traefik.http.routers.portfolio-secure.entrypoints=https" 47 | # - "traefik.http.routers.portfolio-secure.rule=Host(`portfolio.ndd.fr`)" 48 | # - "traefik.http.routers.portfolio-secure.tls=true" 49 | # - "traefik.http.routers.portfolio-secure.tls.certresolver=http" 50 | # - "traefik.docker.network=proxy" 51 | # 52 | #networks: 53 | # proxy: 54 | # external: 55 | # name: proxy 56 | -------------------------------------------------------------------------------- /powershell/excel_to_csv.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | The sample scripts are not supported under any Microsoft standard support 3 | program or service. The sample scripts are provided AS IS without warranty 4 | of any kind. Microsoft further disclaims all implied warranties including, 5 | without limitation, any implied warranties of merchantability or of fitness for 6 | a particular purpose. The entire risk arising out of the use or performance of 7 | the sample scripts and documentation remains with you. In no event shall 8 | Microsoft, its authors, or anyone Else involved in the creation, production, or 9 | delivery of the scripts be liable for any damages whatsoever (including, 10 | without limitation, damages for loss of business profits, business interruption, 11 | loss of business information, or other pecuniary loss) arising out of the use 12 | of or inability to use the sample scripts or documentation, even If Microsoft 13 | has been advised of the possibility of such damages 14 | #> 15 | 16 | $ErrorActionPreference = 'Stop' 17 | 18 | Function Convert-CsvInBatch 19 | { 20 | [CmdletBinding()] 21 | Param 22 | ( 23 | [Parameter(Mandatory=$true)][String]$Folder 24 | ) 25 | $ExcelFiles = Get-ChildItem -Path $Folder -Filter *.xlsx -Recurse 26 | 27 | $excelApp = New-Object -ComObject Excel.Application 28 | $excelApp.DisplayAlerts = $false 29 | 30 | $ExcelFiles | ForEach-Object { 31 | $workbook = $excelApp.Workbooks.Open($_.FullName) 32 | $csvFilePath = $_.FullName -replace "\.xlsx$", ".csv" 33 | $workbook.SaveAs($csvFilePath, [Microsoft.Office.Interop.Excel.XlFileFormat]::xlCSV) 34 | $workbook.Close() 35 | } 36 | 37 | # Release Excel Com Object resource 38 | $excelApp.Workbooks.Close() 39 | $excelApp.Visible = $true 40 | Start-Sleep 5 41 | $excelApp.Quit() 42 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($excelApp) | Out-Null 43 | } 44 | 45 | # 46 | # 0. Prepare the folder path which contains all excel files 47 | $FolderPath = "D:\var\projects\OCOS\var\excelchange" 48 | 49 | Convert-CsvInBatch -Folder $FolderPath 50 | -------------------------------------------------------------------------------- /powershell/office365_adduser.ps1: -------------------------------------------------------------------------------- 1 | 2 | $ErrorActionPreference = 'Stop' 3 | 4 | Function Convert-CsvInBatch 5 | { 6 | [CmdletBinding()] 7 | Param 8 | ( 9 | [Parameter(Mandatory=$true)][String]$Folder 10 | ) 11 | $ExcelFiles = Get-ChildItem -Path $Folder -Filter *.xlsx -Recurse 12 | 13 | $excelApp = New-Object -ComObject Excel.Application 14 | $excelApp.DisplayAlerts = $false 15 | 16 | $ExcelFiles | ForEach-Object { 17 | $workbook = $excelApp.Workbooks.Open($_.FullName) 18 | $csvFilePath = $_.FullName -replace "\.xlsx$", ".csv" 19 | $workbook.SaveAs($csvFilePath, [Microsoft.Office.Interop.Excel.XlFileFormat]::xlCSV) 20 | $workbook.Close() 21 | } 22 | 23 | # Release Excel Com Object resource 24 | $excelApp.Workbooks.Close() 25 | $excelApp.Visible = $true 26 | Start-Sleep 5 27 | $excelApp.Quit() 28 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($excelApp) | Out-Null 29 | } 30 | 31 | # 32 | # 0. Prepare the folder path which contains all excel files 33 | $FolderPath = "C:/Office365" 34 | 35 | Convert-CsvInBatch -Folder $FolderPath 36 | 37 | 38 | ## Authentification Office 365 39 | 40 | Connect-MsolService 41 | $MsoExchangeURL = "https://ps.outlook.com/PowerShell-LiveID?PSVersion=5.0.10586.122" 42 | $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $MsoExchangeURL -Credential $Credentials -Authentication Basic -AllowRedirection 43 | 44 | ## Importer les paramètres de la session Office 365 Microsoft Online 45 | Import-PSSession $Session 46 | 47 | ## Récupérer le contenu du fichier CSV 48 | $CSV = Import-Csv -Path "C:\ajout-utilisateur.csv" -Delimiter ";" -Encoding Default 49 | 50 | foreach($User in $CSV){ 51 | $UserName = $User.PRENOM 52 | $UserSurname = $User.NOM 53 | $UserDisplayName = $User.PRENOM + " " + $User.NOM 54 | $UserPassword = $User.PASSWORD 55 | 56 | # Licence à attribuer à l'utilisateur 57 | $UserLicense = "entreprise:STANDARDWOFFPACK_STUDENT" 58 | 59 | # UPN sous la forme prenom.nom@ndd 60 | $UserPrincipalName = ($UserName).ToLower() + "." + ($UserSurname).ToLower() + "@ndd.fr" ## Nom de domaine de la société 61 | 62 | try{ 63 | # Créer l'utilisateur 64 | New-MsolUser -DisplayName $UserDisplayName -FirstName $UserName -LastName $UserSurname ` 65 | -UserPrincipalName $UserPrincipalName ` 66 | -StrongPasswordRequired $false -PasswordNeverExpires $true -Password $UserPassword ` 67 | -LicenseAssignment $UserLicense -UsageLocation "FR" 68 | 69 | Write-Host "Utilisateur $UserDisplayName créé avec succès !" -ForegroundColor Green 70 | 71 | }catch{ 72 | 73 | Write-Host "ATTENTION ! Impossible de créer l'utilisateur $UserDisplayName" -ForegroundColor Red 74 | 75 | } 76 | 77 | } --------------------------------------------------------------------------------