create repository
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 40s

This commit is contained in:
Hubert Cornet 2024-11-25 19:16:15 +01:00
parent c460b8db5f
commit f58c057fee
3 changed files with 33 additions and 41 deletions

View File

@ -22,7 +22,7 @@ jobs:
- name: Create necessary Docker networks
run: |
docker network create back_network || true
docker network create back_network_stirling || true
docker network create traefik_front_network || true
- name: Start up services using Docker Compose
@ -30,8 +30,7 @@ jobs:
# - name: Modify /etc/hosts for internal routing
# run: |
# 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
# echo "127.0.0.1 stirling-pdf.tips-of-mine.com" | sudo tee -a /etc/hosts
- name: Print Docker Compose services status
run: docker ps
@ -39,11 +38,11 @@ jobs:
- 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://metabase.tips-of-mine.com"; do echo "Waiting for the application to be ready..."; sleep 10; done'
timeout 5m bash -c 'while ! curl -fsSLk "https://stirling-pdf.tips-of-mine.com"; do echo "Waiting for the application to be ready..."; sleep 10; done'
- name: Inspect Network Configuration
run: |
docker network inspect back_network
docker network inspect back_network_stirling
docker network inspect traefik_front_network
- name: Shutdown Docker Compose services
@ -54,4 +53,4 @@ jobs:
if: always()
run: |
docker compose --profile setup down
rm -rf /workspace/tips-of-mine/metabase/*
rm -rf /workspace/tips-of-mine/stirling-pdf/*

View File

@ -22,7 +22,7 @@ jobs:
- name: Create necessary Docker networks
run: |
docker network create back_network_{ vars.APPLICATION_NAME } || true
docker network create back_network_stirling || true
docker network create traefik_front_network || true
- name: Start up services using Docker Compose
@ -30,8 +30,7 @@ jobs:
# - 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
# echo "127.0.0.1 stirling-pdf.tips-of-mine.com" | sudo tee -a /etc/hosts
- name: Print Docker Compose services status
run: docker ps
@ -39,11 +38,11 @@ jobs:
- 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'
timeout 5m bash -c 'while ! curl -fsSLk "https://stirling-pdf.tips-of-mine.com"; 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 back_network_stirling
docker network inspect traefik_front_network
- name: Shutdown Docker Compose services

View File

@ -1,42 +1,36 @@
#### NETWORKS
networks:
traefik_front_network:
docker-traefik_front_network:
external: true
back_network_:
back_network_stirling:
driver: bridge
attachable: true
#### SERVICES
services:
### hello_world
hello_world:
container_name: gitea-app
hostname: gitea-app
image: hello-world
environment:
restart: always
### stirling-pdf
stirling-pdf:
container_name: stirling-pdf-app
hostname: stirling-pdf-app
image: frooodle/s-pdf:latest
networks:
# - back_network_gitea
- traefik_front_network
- docker-traefik_front_network
volumes:
- ./trainingData:/usr/share/tesseract-ocr/4.00/tessdata
- ./extraConfigs:/configs
environment:
- DOCKER_ENABLE_SECURITY=false
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_front_network"
# HTTP
- "traefik.http.routers.hello-world-http.rule=Host(`hello-world.tips-of-mine.com`)"
- "traefik.http.routers.hello-world-http.entrypoints=http"
- "traefik.http.routers.hello-world-http.priority=49"
# HTTPS
- "traefik.http.routers.hello-world-https.rule=Host(`hello-world.tips-of-mine.com`)"
- "traefik.http.routers.hello-world-https.entrypoints=https"
- "traefik.http.routers.hello-world-https.tls=true"
- "traefik.http.routers.hello-world-https.priority=50"
- "traefik.http.routers.gitea.service=gitea-https-service"
# Middleware
# Service
# - "traefik.http.services.gitea-https-service.loadbalancer.server.port=3000"
# - "traefik.http.services.gitea-https-service.loadbalancer.server.scheme=https"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.hostname=gitea.traefik.me"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.method=foobar"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.timeout=10"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.interval=30"
- "traefik.docker.network=docker-traefik_front_network"
## HTTP
- "traefik.http.routers.stirling-pdf-http.rule=Host(`stirling-pdf.tips-of-mine.com`)"
- "traefik.http.routers.stirling-pdf-http.entrypoints=http"
## HTTPS
- "traefik.http.routers.stirling-pdf-https.rule=Host(`stirling-pdf.tips-of-mine.com`)"
- "traefik.http.routers.stirling-pdf-https.entrypoints=https"
- "traefik.http.routers.stirling-pdf-https.tls=true"
- "traefik.http.routers.stirling-pdf.service=stirling-pdf-service"
## Middleware
## Service
- "traefik.http.services.stirling-pdf-service.loadbalancer.server.port=8080"