diff --git a/Outils/docuseal/LICENSE copy b/Outils/docuseal/LICENSE copy new file mode 100644 index 00000000..58a1d1b3 --- /dev/null +++ b/Outils/docuseal/LICENSE copy @@ -0,0 +1,3 @@ +Additional permission under GNU GPL version 3 section 7 + +If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work. diff --git a/Outils/docuseal/README.md b/Outils/docuseal/README.md new file mode 100644 index 00000000..69e5af1e --- /dev/null +++ b/Outils/docuseal/README.md @@ -0,0 +1,66 @@ +![Gitea](./img/banniere-Gitea.png) +URL : https://github.com/shlinkio/shlink + +# Gitea + +Gitea est un service Git auto-h?mable ?crit en GO, et tr?s l?ger. Il est assez similaire ? GitHub, Bitbucket et Gitlab. En plus d'un appui pour le contr?le de la r?vision de Git, il fournit ?galement un suivi des probl?mes et le d?veloppement des pages wiki. Si vous cherchez une alternative ? Gitea, consultez mon article sur Forgejo. + +# Téléchargement, Configuration et Lancement + +## Téléchargement de Gitea + +Saisir la commande pour télécharger la source +```bash +git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git +``` + +Saisir la commande pour vous rendre dans le dossier +```bash +cd Repository\Gitea +``` + +## Modifier la configuration de Gitea + +Saisir la commande pour vous rendre dans le dossier +```bash +cd Repository\Gitea +``` + +Nous éditons le fichier de configuration +```bash +nano .env +``` + +Nous modifions les variables dont nous avons besoin. + +## Lancement de Gitea + +Pour utiliser Gitea tout seul +```bash +docker compose up -d +``` + +Pour utiliser Gitea avec Traefik +```bash +docker compose -f docker-compose-traefik.yml up -d +``` + +# Utilisation + +## Accueil + +Ouvrir une page web avec l'url : +Pour une utilisation tout seul + + http://10.0.4.29:3000 + +Pour une utilisation avec Traefik + + https://Gitea.traefik.me`)" + + +# More info +- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/) + +# Buy me a coffe +Buy Me a Coffee at ko-fi.com diff --git a/Outils/docuseal/docker-compose-traefik.yml b/Outils/docuseal/docker-compose-traefik.yml new file mode 100644 index 00000000..39229c1d --- /dev/null +++ b/Outils/docuseal/docker-compose-traefik.yml @@ -0,0 +1,131 @@ +#### NETWORKS +networks: + traefik_front_network: + external: true + back_network: + driver: bridge + attachable: true + +#### SERVICES +services: +### docuseal + docuseal: + container_name: docuseal-app + hostname: docuseal-app + image: docuseal/docuseal:latest + volumes: + - ./docuseal:/data/docuseal + environment: + - FORCE_SSL=https://docuseal.traefik.me + - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal + depends_on: + postgres: + condition: service_healthy + restart: true + msmtpd: + condition: service_healthy + restart: true + networks: + - traefik_front_network + - back_network + labels: + - "traefik.enable=true" + - "traefik.docker.network=traefik_front_network" +# HTTP + - "traefik.http.routers.docuseal-http.rule=Host(`docuseal.traefik.me`)" + - "traefik.http.routers.docuseal-http.entrypoints=http" +# HTTPS + - "traefik.http.routers.docuseal-https.rule=Host(`docuseal.traefik.me`)" + - "traefik.http.routers.docuseal-https.entrypoints=https" + - "traefik.http.routers.docuseal-https.service=docuseal-service" + - "traefik.http.routers.docuseal-https.tls=true" +# Middleware +# Service + - "traefik.http.services.docuseal-service.loadbalancer.server.port=3000" + +### postgres + postgres: + container_name: docuseal-postgres + hostname: docuseal-postgres + image: postgres:15.6-alpine + environment: + PGDATA: /var/lib/postgresql/data/docuseal + POSTGRES_DB: docuseal + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + networks: + - back_network + restart: always + volumes: + - ./data:/var/lib/postgresql/data:rw + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 + +### msmtpd + msmtpd: + container_name: docuseal-msmtpd + hostname: docuseal-msmtpd + image: crazymax/msmtpd:latest + networks: + - back_network + environment: + - "TZ=Europe/Paris" + - "PUID=1500" + - "PGID=1500" + - "SMTP_HOST=10.0.4.52" + - "SMTP_PORT=587" + - "SMTP_TLS=on" + - "SMTP_STARTTLS=on" + - "SMTP_TLS_CHECKCERT=off" + - "SMTP_AUTH=on" + - "SMTP_USER=hostinfo@tips-of-mine.fr" + - "SMTP_PASSWORD=Passw0rd#12345" + - "SMTP_DOMAIN=localhost" + - "SMTP_FROM=hostinfo@tips-of-mine.fr" + restart: always + healthcheck: + test: ["CMD-SHELL", "echo EHLO localhost"] + interval: 5s + timeout: 5s + retries: 5 + +### backups + backups: + container_name: docuseal-postgres-backup + hostname: docuseal-postgres-backup + image: postgres:15.6-alpine + command: >- + sh -c 'sleep 30m && + while true; do + pg_dump -h postgres -p 5432 -d $POSTGRE_DB_NAME -U $POSTGRE_DB_USER | gzip > $POSTGRES_BACKUPS_PATH/$POSTGRES_BACKUP_NAME-$(date "+%Y-%m-%d_%H-%M").gz && + tar -zcpf $DATA_BACKUPS_PATH/$DATA_BACKUP_NAME-$(date "+%Y-%m-%d_%H-%M").tar.gz $DATA_PATH && + find $POSTGRES_BACKUPS_PATH -type f -mtime +$POSTGRES_BACKUP_PRUNE_DAYS | xargs rm -f && + find $DATA_BACKUPS_PATH -type f -mtime +$DATA_BACKUP_PRUNE_DAYS | xargs rm -f; + sleep $BACKUP_INTERVAL; done' + environment: + GITEA_DB_NAME: postgres + GITEA_DB_USER: postgres + PGPASSWORD: postgres + BACKUP_INIT_SLEEP: 30m + BACKUP_INTERVAL: 24h + POSTGRES_BACKUP_PRUNE_DAYS: 7 + DATA_BACKUP_PRUNE_DAYS: 7 + POSTGRES_BACKUPS_PATH: /srv/docuseal-postgres/backups + DATA_BACKUPS_PATH: /srv/docuseal-application-data/backups + DATA_PATH: /bitnami/docuseal + POSTGRES_BACKUP_NAME: docuseal-postgres-backup + DATA_BACKUP_NAME: docuseal-application-data-backup + restart: unless-stopped + networks: + - back_network + volumes: + - ./backup/data:/var/lib/postgresql/data + - ./backup/docuseal:/bitnami/docuseal + - ./backup/backups:/srv/gdocuseal-application-data/backups + - ./backup/database:/srv/docuseal-postgres/backups + depends_on: + postgres: + condition: service_healthy \ No newline at end of file