first sync

This commit is contained in:
Hubert Cornet 2025-01-30 19:22:50 +01:00
parent 4423232b41
commit 5d5b90da36
2 changed files with 67 additions and 52 deletions

View File

@ -1,24 +1,41 @@
# Template # Template
name: Deployment Verification name: CI/CD Docker Compose
on: on:
push: push:
branches: branches:
- main - develop
pull_request:
branches:
- main
jobs: jobs:
validate:
runs-on: ubuntu-latest
steps:
#
- name: Checkout
uses: actions/checkout@v4
#
- name: Validate file docker-compose.yml
run: |
docker-compose config -q
deploy-and-test: deploy-and-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository #
- name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx # https://github.com/docker/setup-qemu-action#usage
uses: docker/setup-buildx-action@v3 - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
# https://github.com/marketplace/actions/docker-setup-buildx
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v3.6.1
- name: Create necessary Docker networks - name: Create necessary Docker networks
run: | run: |
@ -28,10 +45,14 @@ jobs:
- name: Start up services using Docker Compose - name: Start up services using Docker Compose
run: docker compose up -d run: docker compose up -d
# - name: Modify /etc/hosts for internal routing - name: Modify /etc/hosts for internal routing
# run: | run: |
# echo "127.0.0.1 gitea.tips-of-mine.com" | sudo tee -a /etc/hosts echo "127.0.0.1 docuseal.tips-of-mine.com" | sudo tee -a /etc/hosts
# echo "127.0.0.1 dashboard.tips-of-mine.com" | sudo tee -a /etc/hosts
- name: Wait
run: |
# Attendre que les services soient prêts (adapter selon vos besoins)
sleep 30
- name: Print Docker Compose services status - name: Print Docker Compose services status
run: docker ps run: docker ps
@ -49,3 +70,12 @@ jobs:
- name: Shutdown Docker Compose services - name: Shutdown Docker Compose services
if: always() if: always()
run: docker compose -f docker-compose.yml down run: docker compose -f docker-compose.yml down
- name: Fusionner dans main (si les tests réussissent)
if: success()
run: |
git config user.name 'Gitea Actions'
git config user.email 'actions@gitea.io'
git checkout main
git merge develop --no-ff -m "Fusion automatique de develop suite aux tests réussis"
git push origin main

View File

@ -1,8 +1,9 @@
#### NETWORKS #### NETWORKS
networks: networks:
traefik_front_network: traefik_front_network:
external: true external: true
back_network: back_network_docuseal:
driver: bridge driver: bridge
attachable: true attachable: true
@ -12,8 +13,6 @@ services:
container_name: docuseal-app container_name: docuseal-app
hostname: docuseal-app hostname: docuseal-app
image: docuseal/docuseal:latest image: docuseal/docuseal:latest
# ports:
# - 3900:3000
volumes: volumes:
- ./docuseal:/data/docuseal - ./docuseal:/data/docuseal
environment: environment:
@ -28,7 +27,7 @@ services:
restart: true restart: true
networks: networks:
- traefik_front_network - traefik_front_network
- back_network - back_network_docuseal
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.docker.network=traefik_front_network" - "traefik.docker.network=traefik_front_network"
@ -54,7 +53,7 @@ services:
POSTGRES_USER: postgres POSTGRES_USER: postgres
image: postgres:15.6-alpine image: postgres:15.6-alpine
networks: networks:
- back_network - back_network_docuseal
restart: always restart: always
volumes: volumes:
- ./data:/var/lib/postgresql/data:rw - ./data:/var/lib/postgresql/data:rw
@ -69,9 +68,7 @@ services:
hostname: docuseal-msmtpd hostname: docuseal-msmtpd
image: crazymax/msmtpd:latest image: crazymax/msmtpd:latest
networks: networks:
- back_network - back_network_docuseal
# ports:
# - 2500:2500
environment: environment:
- "TZ=Europe/Paris" - "TZ=Europe/Paris"
- "PUID=1500" - "PUID=1500"
@ -84,23 +81,11 @@ services:
- "SMTP_AUTH=on" - "SMTP_AUTH=on"
- "SMTP_USER=hostinfo@tips-of-mine.fr" - "SMTP_USER=hostinfo@tips-of-mine.fr"
- "SMTP_PASSWORD=Whf2VtLEd2QR4er" - "SMTP_PASSWORD=Whf2VtLEd2QR4er"
# - "SMTP_USER_FILE=/run/secrets/smtp_user"
# - "SMTP_PASSWORD_FILE=/run/secrets/smtp_password"
- "SMTP_DOMAIN=localhost" - "SMTP_DOMAIN=localhost"
- "SMTP_FROM=hostinfo@tips-of-mine.fr" - "SMTP_FROM=hostinfo@tips-of-mine.fr"
# secrets:
# - smtp_user
# - smtp_password
restart: always restart: always
healthcheck: healthcheck:
test: ["CMD-SHELL", "echo EHLO localhost"] test: ["CMD-SHELL", "echo EHLO localhost"]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 5 retries: 5
# secrets:
# smtp_user:
# external: true
# smtp_password:
# external: true