Update : add smtp host
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 10s
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 10s
This commit is contained in:
parent
e0d7ed3745
commit
123fceb65a
@ -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
|
||||||
@ -64,4 +56,4 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
docker compose --profile setup down
|
docker compose --profile setup down
|
||||||
rm -rf /workspace/tips-of-mine/metabase/*
|
rm -rf /workspace/tips-of-mine/metabase/*
|
53
.gitea/workflows/ci-main.yml
Normal file
53
.gitea/workflows/ci-main.yml
Normal 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
|
@ -75,4 +75,32 @@ services:
|
|||||||
interval: 10s
|
interval: 10s
|
||||||
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
|
Loading…
x
Reference in New Issue
Block a user