From f58c057fee7d2cfd6ded3928883296008d8db5c0 Mon Sep 17 00:00:00 2001 From: hcornet Date: Mon, 25 Nov 2024 19:16:15 +0100 Subject: [PATCH] create repository --- .gitea/workflows/ci-develop.yml | 11 +++---- .gitea/workflows/ci-main.yml | 9 +++--- docker-compose.yml | 54 +++++++++++++++------------------ 3 files changed, 33 insertions(+), 41 deletions(-) diff --git a/.gitea/workflows/ci-develop.yml b/.gitea/workflows/ci-develop.yml index 9728a42..3e43c83 100644 --- a/.gitea/workflows/ci-develop.yml +++ b/.gitea/workflows/ci-develop.yml @@ -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/* \ No newline at end of file + rm -rf /workspace/tips-of-mine/stirling-pdf/* \ No newline at end of file diff --git a/.gitea/workflows/ci-main.yml b/.gitea/workflows/ci-main.yml index bf77843..6c288f4 100644 --- a/.gitea/workflows/ci-main.yml +++ b/.gitea/workflows/ci-main.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 4054566..47332f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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" \ No newline at end of file