Update : add smtp host
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 10s

This commit is contained in:
Hubert Cornet 2024-11-26 19:46:15 +01:00
parent e0d7ed3745
commit 123fceb65a
3 changed files with 88 additions and 15 deletions

View File

@ -1,33 +1,24 @@
# Template # Template
name: Deployment Verification name: Deployment Verification
run-name: Build & Deploy ${{ gitea.ref }} on ${{ gitea.actor }}
on: on:
push: push:
branches: branches:
- develop - develop
tags: tags:
- "v[0-9]+.[0-9]+.[0-9]+" - "v[0-9]+.[0-9]+.[0-9]"
pull_request: pull_request:
types:
- opened
- synchronize
- reopened
branches: branches:
- develop
- main - main
jobs: jobs:
test And Deploy: deploy-and-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -41,7 +32,8 @@ jobs:
# - name: Modify /etc/hosts for internal routing # - name: Modify /etc/hosts for internal routing
# run: | # run: |
# echo "127.0.0.1 metabase metabase.tips-of-mine.local" | sudo tee -a /etc/hosts # echo "127.0.0.1 gitea.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: Print Docker Compose services status - name: Print Docker Compose services status
run: docker ps run: docker ps

View File

@ -0,0 +1,53 @@
# Template
name: Deployment Verification
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]"s
pull_request:
branches:
- main
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create necessary Docker networks
run: |
docker network create back_network_${{ vars.APPLICATION_NAME }} || true
docker network create traefik_front_network || true
- name: Start up services using Docker Compose
run: docker compose -f docker-compose.yml up -d
# - name: Modify /etc/hosts for internal routing
# run: |
# echo "127.0.0.1 ${{ vars.APPLICATION_URL }}" | sudo tee -a /etc/hosts
# echo "127.0.0.1 dashboard.tips-of-mine.com" | sudo tee -a /etc/hosts
- name: Print Docker Compose services status
run: docker ps
- name: Wait for the application to be ready via Traefik
run: |
echo "Checking the routing and availability of application via Traefik..."
timeout 5m bash -c 'while ! curl -fsSLk "https://${{ vars.APPLICATION_URL }}"; do echo "Waiting for the application to be ready..."; sleep 10; done'
- name: Inspect Network Configuration
run: |
docker network inspect back_network_${{ vars.APPLICATION_NAME }}
docker network inspect traefik_front_network
- name: Shutdown Docker Compose services
if: always()
run: docker compose -f docker-compose.yml down

View File

@ -76,3 +76,31 @@ services:
timeout: 5s timeout: 5s
retries: 3 retries: 3
start_period: 60s start_period: 60s
###
msmtpd:
container_name: metabase-msmtpd
hostname: metabase-msmtpd
image: crazymax/msmtpd:latest
networks:
- back_network_metabase
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=P@ssword!Here!123456"
- "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