update
This commit is contained in:
131
Outils/docuseal/docker-compose-traefik.yml
Normal file
131
Outils/docuseal/docker-compose-traefik.yml
Normal file
@ -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
|
Reference in New Issue
Block a user