Compare commits
No commits in common. "develop" and "main" have entirely different histories.
@ -1,32 +1,54 @@
|
|||||||
# Template
|
# Template
|
||||||
name: Deployment Verification
|
name: Deployment Verification
|
||||||
|
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
tags:
|
- main
|
||||||
- "v[0-9]+.[0-9]+.[0-9]"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- develop
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-and-test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# https://github.com/docker/setup-qemu-action#usage
|
|
||||||
- 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
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
uses: docker/setup-buildx-action@v3
|
||||||
uses: docker/setup-buildx-action@v3.6.1
|
|
||||||
|
- name: Start up services using Docker Compose
|
||||||
|
run: docker compose -f docker-compose.yml up -d
|
||||||
|
|
||||||
|
- name: Print Docker Compose services status
|
||||||
|
run: docker ps
|
||||||
|
|
||||||
|
- name: Shutdown Docker Compose services
|
||||||
|
if: always()
|
||||||
|
run: docker compose -f docker-compose.yml down
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker compose --profile setup down
|
||||||
|
rm -rf /workspace/tips-of-mine/metabase/*
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
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
|
- name: Create necessary Docker networks
|
||||||
run: |
|
run: |
|
||||||
@ -38,8 +60,7 @@ jobs:
|
|||||||
|
|
||||||
# - 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 metabase metabase.tips-of-mine.local" | 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
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
# 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
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# https://github.com/docker/setup-qemu-action#usage
|
|
||||||
- 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
|
|
||||||
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
|
|
||||||
|
|
||||||
- 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
|
|
@ -21,7 +21,7 @@ services:
|
|||||||
MB_DB_PASS: ${POSTGRE_DB_PASSWORD}
|
MB_DB_PASS: ${POSTGRE_DB_PASSWORD}
|
||||||
MB_DB_HOST: postgres
|
MB_DB_HOST: postgres
|
||||||
MB_PASSWORD_COMPLEXITY: strong
|
MB_PASSWORD_COMPLEXITY: strong
|
||||||
MB_PASSWORD_LENGTH: 10
|
MB_PASSWORD_LENGTH: 14
|
||||||
JAVA_TIMEZONE: Europe/Paris
|
JAVA_TIMEZONE: Europe/Paris
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
@ -38,7 +38,6 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
labels:
|
labels:
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=traefik_front_network"
|
- "traefik.docker.network=traefik_front_network"
|
||||||
# HTTP
|
# HTTP
|
||||||
@ -77,35 +76,3 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
start_period: 60s
|
||||||
labels:
|
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
|
||||||
|
|
||||||
###
|
|
||||||
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
|
|
||||||
labels:
|
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
|
Loading…
x
Reference in New Issue
Block a user