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 - name: Create necessary Docker networks
run: | run: |
docker network create back_network || true docker network create back_network_stirling || true
docker network create traefik_front_network || true docker network create traefik_front_network || true
- name: Start up services using Docker Compose - name: Start up services using Docker Compose
@ -30,8 +30,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 stirling-pdf.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
@ -39,11 +38,11 @@ jobs:
- name: Wait for the application to be ready via Traefik - name: Wait for the application to be ready via Traefik
run: | run: |
echo "Checking the routing and availability of application via Traefik..." 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 - name: Inspect Network Configuration
run: | run: |
docker network inspect back_network docker network inspect back_network_stirling
docker network inspect traefik_front_network docker network inspect traefik_front_network
- name: Shutdown Docker Compose services - name: Shutdown Docker Compose services
@ -54,4 +53,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/stirling-pdf/*

View File

@ -22,7 +22,7 @@ jobs:
- name: Create necessary Docker networks - name: Create necessary Docker networks
run: | run: |
docker network create back_network_{ vars.APPLICATION_NAME } || true docker network create back_network_stirling || true
docker network create traefik_front_network || true docker network create traefik_front_network || true
- name: Start up services using Docker Compose - name: Start up services using Docker Compose
@ -30,8 +30,7 @@ jobs:
# - name: Modify /etc/hosts for internal routing # - name: Modify /etc/hosts for internal routing
# run: | # run: |
# echo "127.0.0.1 { vars.APPLICATION_URL }" | sudo tee -a /etc/hosts # echo "127.0.0.1 stirling-pdf.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
@ -39,11 +38,11 @@ jobs:
- name: Wait for the application to be ready via Traefik - name: Wait for the application to be ready via Traefik
run: | run: |
echo "Checking the routing and availability of application via Traefik..." 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 - name: Inspect Network Configuration
run: | run: |
docker network inspect back_network_{ vars.APPLICATION_NAME } docker network inspect back_network_stirling
docker network inspect traefik_front_network docker network inspect traefik_front_network
- name: Shutdown Docker Compose services - name: Shutdown Docker Compose services

View File

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