From 9ac28685d18312cc7a6714665666953d728437a9 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 07:41:52 +0100 Subject: [PATCH 01/18] Update trackdirect-db.dockerfile --- trackdirect-db.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trackdirect-db.dockerfile b/trackdirect-db.dockerfile index a9c9237..ad10023 100644 --- a/trackdirect-db.dockerfile +++ b/trackdirect-db.dockerfile @@ -1,7 +1,7 @@ -FROM postgres +FROM postgres:16 COPY misc/database/tables/* /docker-entrypoint-initdb.d/ COPY config/postgresql.conf /etc/postgresql.conf RUN chown :999 /etc/postgresql.conf RUN chmod 770 /etc/postgresql.conf RUN chmod g+s /etc/postgresql.conf -VOLUME /var/lib/postgresql/data \ No newline at end of file +VOLUME /var/lib/postgresql/data From 9b880dd479a6781514cdfc7da721b2de5cf27e4c Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 07:47:46 +0100 Subject: [PATCH 02/18] Create docker-image.yml --- .github/workflows/docker-image.yml | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..b4ece6d --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,75 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build-db: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file trackdirect-db.dockerfile --tag ghcr.io/mrtalon63/trackdirect-db:latest + - name: Create image with Action ID + run: docker tag ghcr.io/mrtalon63/trackdirect-db:latest ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} + - name: Push both images to ghcr.io + run: docker push ghcr.io/mrtalon63/trackdirect-db:latest && ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} + + build-apache: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file trackdirect-apache.dockerfile --tag ghcr.io/mrtalon63/trackdirect-apache:latest + - name: Create image with Action ID + run: docker tag ghcr.io/mrtalon63/trackdirect-apache:latest ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} + - name: Push both images to ghcr.io + run: docker push ghcr.io/mrtalon63/trackdirect-apache:latest && ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} + + build-python: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file trackdirect-python.dockerfile --tag ghcr.io/mrtalon63/trackdirect-python:latest + - name: Create image with Action ID + run: docker tag ghcr.io/mrtalon63/trackdirect-python:latest ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} + - name: Push both images to ghcr.io + run: docker push ghcr.io/mrtalon63/trackdirect-python:latest && ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} + + build-aprsc: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file trackdirect-aprsc.dockerfile --tag ghcr.io/mrtalon63/trackdirect-aprsc:latest + - name: Create image with Action ID + run: docker tag ghcr.io/mrtalon63/trackdirect-aprsc:latest ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} + - name: Push both images to ghcr.io + run: docker push ghcr.io/mrtalon63/trackdirect-aprsc:latest && ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} + + + build-cron: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file trackdirect-cron.dockerfile --tag ghcr.io/mrtalon63/trackdirect-cron:latest + - name: Create image with Action ID + run: docker tag ghcr.io/mrtalon63/trackdirect-cron:latest ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} + - name: Push both images to ghcr.io + run: docker push ghcr.io/mrtalon63/trackdirect-cron:latest && ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} From 1e62790c6168020e2a928fbdeb0059336da0bb8d Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 07:51:14 +0100 Subject: [PATCH 03/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b4ece6d..5d34bec 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Login to Docker + run: docker login ghcr.io - name: Build the Docker image run: docker build . --file trackdirect-db.dockerfile --tag ghcr.io/mrtalon63/trackdirect-db:latest - name: Create image with Action ID @@ -27,6 +29,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Login to Docker + run: docker login ghcr.io - name: Build the Docker image run: docker build . --file trackdirect-apache.dockerfile --tag ghcr.io/mrtalon63/trackdirect-apache:latest - name: Create image with Action ID @@ -40,6 +44,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Login to Docker + run: docker login ghcr.io - name: Build the Docker image run: docker build . --file trackdirect-python.dockerfile --tag ghcr.io/mrtalon63/trackdirect-python:latest - name: Create image with Action ID @@ -53,6 +59,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Login to Docker + run: docker login ghcr.io - name: Build the Docker image run: docker build . --file trackdirect-aprsc.dockerfile --tag ghcr.io/mrtalon63/trackdirect-aprsc:latest - name: Create image with Action ID @@ -67,6 +75,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Login to Docker + run: docker login ghcr.io - name: Build the Docker image run: docker build . --file trackdirect-cron.dockerfile --tag ghcr.io/mrtalon63/trackdirect-cron:latest - name: Create image with Action ID From 559d4265d5ae4b748518621a189bda5e530bf1d9 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 07:58:11 +0100 Subject: [PATCH 04/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 32 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5d34bec..f1e6505 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,20 +8,28 @@ on: jobs: - build-db: - + docker-build-db: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Login to Docker - run: docker login ghcr.io - - name: Build the Docker image - run: docker build . --file trackdirect-db.dockerfile --tag ghcr.io/mrtalon63/trackdirect-db:latest - - name: Create image with Action ID - run: docker tag ghcr.io/mrtalon63/trackdirect-db:latest ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} - - name: Push both images to ghcr.io - run: docker push ghcr.io/mrtalon63/trackdirect-db:latest && ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: mrtalon63 + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: trackdirect-db.dockerfile + push: true + tags: | + ghcr.io/mrtalon63/trackdirect-db:latest + ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} build-apache: From ea3a53e4e112dc44a0eca3953c9e81bb7f30575b Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 07:59:08 +0100 Subject: [PATCH 05/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f1e6505..d55a61b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -24,7 +24,6 @@ jobs: - name: Build and push uses: docker/build-push-action@v6 with: - context: . file: trackdirect-db.dockerfile push: true tags: | From 390e86ae76a59fb3c09378f40dc64c2453e99d4f Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Tue, 14 Jan 2025 08:05:08 +0100 Subject: [PATCH 06/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 125 ++++++++++++++++++----------- 1 file changed, 76 insertions(+), 49 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d55a61b..1c1cc8d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -30,63 +30,90 @@ jobs: ghcr.io/mrtalon63/trackdirect-db:latest ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} - build-apache: - + docker-build-apache: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Login to Docker - run: docker login ghcr.io - - name: Build the Docker image - run: docker build . --file trackdirect-apache.dockerfile --tag ghcr.io/mrtalon63/trackdirect-apache:latest - - name: Create image with Action ID - run: docker tag ghcr.io/mrtalon63/trackdirect-apache:latest ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} - - name: Push both images to ghcr.io - run: docker push ghcr.io/mrtalon63/trackdirect-apache:latest && ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} - - build-python: + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: mrtalon63 + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: trackdirect-apache.dockerfile + push: true + tags: | + ghcr.io/mrtalon63/trackdirect-apache:latest + ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} + docker-build-python: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Login to Docker - run: docker login ghcr.io - - name: Build the Docker image - run: docker build . --file trackdirect-python.dockerfile --tag ghcr.io/mrtalon63/trackdirect-python:latest - - name: Create image with Action ID - run: docker tag ghcr.io/mrtalon63/trackdirect-python:latest ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} - - name: Push both images to ghcr.io - run: docker push ghcr.io/mrtalon63/trackdirect-python:latest && ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} - - build-aprsc: + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: mrtalon63 + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: trackdirect-python.dockerfile + push: true + tags: | + ghcr.io/mrtalon63/trackdirect-python:latest + ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} + docker-build-aprsc: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Login to Docker - run: docker login ghcr.io - - name: Build the Docker image - run: docker build . --file trackdirect-aprsc.dockerfile --tag ghcr.io/mrtalon63/trackdirect-aprsc:latest - - name: Create image with Action ID - run: docker tag ghcr.io/mrtalon63/trackdirect-aprsc:latest ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} - - name: Push both images to ghcr.io - run: docker push ghcr.io/mrtalon63/trackdirect-aprsc:latest && ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} - - - build-cron: + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: mrtalon63 + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: trackdirect-aprsc.dockerfile + push: true + tags: | + ghcr.io/mrtalon63/trackdirect-aprsc:latest + ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} + docker-build-cron: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Login to Docker - run: docker login ghcr.io - - name: Build the Docker image - run: docker build . --file trackdirect-cron.dockerfile --tag ghcr.io/mrtalon63/trackdirect-cron:latest - - name: Create image with Action ID - run: docker tag ghcr.io/mrtalon63/trackdirect-cron:latest ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} - - name: Push both images to ghcr.io - run: docker push ghcr.io/mrtalon63/trackdirect-cron:latest && ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} + - name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: mrtalon63 + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: trackdirect-cron.dockerfile + push: true + tags: | + ghcr.io/mrtalon63/trackdirect-cron:latest + ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} From 3206d5de57d0f1d4fea1f7d7f557171b92bec8f2 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Fri, 17 Jan 2025 22:03:59 +0100 Subject: [PATCH 07/18] Update trackdirect-db.dockerfile --- trackdirect-db.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackdirect-db.dockerfile b/trackdirect-db.dockerfile index ad10023..e0576f8 100644 --- a/trackdirect-db.dockerfile +++ b/trackdirect-db.dockerfile @@ -1,4 +1,4 @@ -FROM postgres:16 +FROM postgres:17 COPY misc/database/tables/* /docker-entrypoint-initdb.d/ COPY config/postgresql.conf /etc/postgresql.conf RUN chown :999 /etc/postgresql.conf From 119dece79b8b015f97d994fd86aceded4cacd861 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Wed, 29 Jan 2025 16:26:42 +0100 Subject: [PATCH 08/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 1c1cc8d..fce2d11 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,7 +15,7 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: mrtalon63 + username: ${{ github.repository_owner}} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -27,8 +27,8 @@ jobs: file: trackdirect-db.dockerfile push: true tags: | - ghcr.io/mrtalon63/trackdirect-db:latest - ghcr.io/mrtalon63/trackdirect-db:${{ github.RUN_ID }} + ghcr.io/${{ github.repository }}-db:latest + ghcr.io/${{ github.repository }}-db:${{ github.RUN_ID }} docker-build-apache: runs-on: ubuntu-latest @@ -37,7 +37,7 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: mrtalon63 + username: ${{ github.repository_owner}} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -49,8 +49,8 @@ jobs: file: trackdirect-apache.dockerfile push: true tags: | - ghcr.io/mrtalon63/trackdirect-apache:latest - ghcr.io/mrtalon63/trackdirect-apache:${{ github.RUN_ID }} + ghcr.io/${{ github.repository }}-apache:latest + ghcr.io/${{ github.repository }}-apache:${{ github.RUN_ID }} docker-build-python: runs-on: ubuntu-latest @@ -59,7 +59,7 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: mrtalon63 + username: ${{ github.repository_owner}} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -71,8 +71,8 @@ jobs: file: trackdirect-python.dockerfile push: true tags: | - ghcr.io/mrtalon63/trackdirect-python:latest - ghcr.io/mrtalon63/trackdirect-python:${{ github.RUN_ID }} + ghcr.io/${{ github.repository }}-python:latest + ghcr.io/${{ github.repository }}-python:${{ github.RUN_ID }} docker-build-aprsc: runs-on: ubuntu-latest @@ -81,7 +81,7 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: mrtalon63 + username: ${{ github.repository_owner}} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -93,8 +93,8 @@ jobs: file: trackdirect-aprsc.dockerfile push: true tags: | - ghcr.io/mrtalon63/trackdirect-aprsc:latest - ghcr.io/mrtalon63/trackdirect-aprsc:${{ github.RUN_ID }} + ghcr.io/${{ github.repository }}-aprsc:latest + ghcr.io/${{ github.repository }}-aprsc:${{ github.RUN_ID }} docker-build-cron: runs-on: ubuntu-latest @@ -103,7 +103,7 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: mrtalon63 + username: ${{ github.repository_owner}} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -115,5 +115,5 @@ jobs: file: trackdirect-cron.dockerfile push: true tags: | - ghcr.io/mrtalon63/trackdirect-cron:latest - ghcr.io/mrtalon63/trackdirect-cron:${{ github.RUN_ID }} + ghcr.io/${{ github.repository }}-cron:latest + ghcr.io/${{ github.repository }}-cron:${{ github.RUN_ID }} From 126ea8aa172f6a683e135d1f6fb935230b48d7ac Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Wed, 29 Jan 2025 16:33:12 +0100 Subject: [PATCH 09/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fce2d11..d8d01f2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,6 +8,12 @@ on: jobs: + repo-name: + runs-on: ubuntu-latest + steps: + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} + docker-build-db: runs-on: ubuntu-latest steps: @@ -27,8 +33,8 @@ jobs: file: trackdirect-db.dockerfile push: true tags: | - ghcr.io/${{ github.repository }}-db:latest - ghcr.io/${{ github.repository }}-db:${{ github.RUN_ID }} + ghcr.io/${{ env.IMAGE_NAME }}-db:latest + ghcr.io/${{ env.IMAGE_NAME }}-db:${{ github.RUN_ID }} docker-build-apache: runs-on: ubuntu-latest @@ -49,8 +55,8 @@ jobs: file: trackdirect-apache.dockerfile push: true tags: | - ghcr.io/${{ github.repository }}-apache:latest - ghcr.io/${{ github.repository }}-apache:${{ github.RUN_ID }} + ghcr.io/${{ env.IMAGE_NAME }}-apache:latest + ghcr.io/${{ env.IMAGE_NAME }}-apache:${{ github.RUN_ID }} docker-build-python: runs-on: ubuntu-latest @@ -71,8 +77,8 @@ jobs: file: trackdirect-python.dockerfile push: true tags: | - ghcr.io/${{ github.repository }}-python:latest - ghcr.io/${{ github.repository }}-python:${{ github.RUN_ID }} + ghcr.io/${{ env.IMAGE_NAME }}-python:latest + ghcr.io/${{ env.IMAGE_NAME }}-python:${{ github.RUN_ID }} docker-build-aprsc: runs-on: ubuntu-latest @@ -93,8 +99,8 @@ jobs: file: trackdirect-aprsc.dockerfile push: true tags: | - ghcr.io/${{ github.repository }}-aprsc:latest - ghcr.io/${{ github.repository }}-aprsc:${{ github.RUN_ID }} + ghcr.io/${{ env.IMAGE_NAME }}-aprsc:latest + ghcr.io/${{ env.IMAGE_NAME }}-aprsc:${{ github.RUN_ID }} docker-build-cron: runs-on: ubuntu-latest @@ -115,5 +121,5 @@ jobs: file: trackdirect-cron.dockerfile push: true tags: | - ghcr.io/${{ github.repository }}-cron:latest - ghcr.io/${{ github.repository }}-cron:${{ github.RUN_ID }} + ghcr.io/${{ env.IMAGE_NAME }}-cron:latest + ghcr.io/${{ env.IMAGE_NAME }}-cron:${{ github.RUN_ID }} From 7744afdf0674b2fca351fd65728be7d7be02f3b5 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Wed, 29 Jan 2025 16:34:48 +0100 Subject: [PATCH 10/18] Update docker-image.yml --- .github/workflows/docker-image.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d8d01f2..8fe69c6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,12 +8,6 @@ on: jobs: - repo-name: - runs-on: ubuntu-latest - steps: - - name: lowercase github.repository - run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - docker-build-db: runs-on: ubuntu-latest steps: @@ -27,6 +21,8 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: @@ -49,6 +45,8 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: @@ -71,6 +69,8 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: @@ -93,6 +93,8 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: @@ -115,6 +117,8 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: lowercase github.repository + run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV} - name: Build and push uses: docker/build-push-action@v6 with: From 753b5ace491c4a7e0558259bf14826c3f8cc837c Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Fri, 16 May 2025 12:19:09 +0200 Subject: [PATCH 11/18] Update remover.py --- server/bin/remover.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/server/bin/remover.py b/server/bin/remover.py index c7637d0..761d9cc 100644 --- a/server/bin/remover.py +++ b/server/bin/remover.py @@ -27,10 +27,14 @@ def validate_config_file(config_file): print("\nUsage: script.py [config.ini]") sys.exit() -def drop_table_if_exists(cursor, table_name, logger): - if DatabaseObjectFinder.check_table_exists(table_name): - cursor.execute(f"DROP TABLE {table_name}") - logger.info(f"Dropped table {table_name}") +def drop_table_if_exists(cursor, table_name, logger, db_finder): + try: + if db_finder.check_table_exists(table_name): + cursor.execute(f"DROP TABLE IF EXISTS {table_name}") + logger.info(f"Dropped table {table_name}") + except Exception as e: + logger.error(f"Error dropping table {table_name}: {str(e)}", exc_info=True) + def main(): if len(sys.argv) < 2: @@ -73,7 +77,7 @@ def main(): for x in range(2, 16): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_timestamp = int(prev_day.strftime("%s")) - prev_day_format = datetime.datetime.utcfromtimestamp(prev_day_timestamp).strftime('%Y%m%d') + prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}" if track_direct_db_object_finder.check_table_exists(packet_table): @@ -99,14 +103,13 @@ def main(): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}_weather" - drop_table_if_exists(cursor, packet_table, logger) - + drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) # Drop packet_telemetry for x in range(max_days_to_save_telemetry_data, max_days_to_save_telemetry_data + 100): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}_telemetry" - drop_table_if_exists(cursor, packet_table, logger) + drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) # Drop packets for x in range(max_days_to_save_position_data, max_days_to_save_position_data + 100): @@ -114,9 +117,9 @@ def main(): prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}" - drop_table_if_exists(cursor, f"{packet_table}_ogn", logger) - drop_table_if_exists(cursor, f"{packet_table}_path", logger) - drop_table_if_exists(cursor, packet_table, logger) + drop_table_if_exists(cursor, f"{packet_table}_ogn", logger, track_direct_db_object_finder) + drop_table_if_exists(cursor, f"{packet_table}_path", logger, track_direct_db_object_finder) + drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) # Delete old stations timestamp_limit = int(time.time()) - (60 * 60 * 24 * max_days_to_save_station_data) @@ -181,4 +184,4 @@ def main(): logger.error(e, exc_info=1) if __name__ == '__main__': - main() \ No newline at end of file + main() From 02ff8038b0b285f0b8e801047f806446514a3c95 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Fri, 23 May 2025 10:01:22 +0200 Subject: [PATCH 12/18] Update index.php --- htdocs/public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/index.php b/htdocs/public/index.php index 1d2f4c0..fc3fc90 100755 --- a/htdocs/public/index.php +++ b/htdocs/public/index.php @@ -45,7 +45,7 @@ - + From 551a21cb96ca98e3a17fc367601203ab14110b27 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Fri, 23 May 2025 10:11:34 +0200 Subject: [PATCH 13/18] Update index.php --- htdocs/public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/index.php b/htdocs/public/index.php index fc3fc90..da8d809 100755 --- a/htdocs/public/index.php +++ b/htdocs/public/index.php @@ -45,7 +45,7 @@ - + From 7c5373bcec1965ac3655741f4f69a4161cb7cb5a Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Sun, 29 Jun 2025 05:27:22 +0200 Subject: [PATCH 14/18] Update remover.py --- server/bin/remover.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/server/bin/remover.py b/server/bin/remover.py index 761d9cc..b0a711d 100644 --- a/server/bin/remover.py +++ b/server/bin/remover.py @@ -27,14 +27,10 @@ def validate_config_file(config_file): print("\nUsage: script.py [config.ini]") sys.exit() -def drop_table_if_exists(cursor, table_name, logger, db_finder): - try: - if db_finder.check_table_exists(table_name): - cursor.execute(f"DROP TABLE IF EXISTS {table_name}") - logger.info(f"Dropped table {table_name}") - except Exception as e: - logger.error(f"Error dropping table {table_name}: {str(e)}", exc_info=True) - +def drop_table_if_exists(cursor, dbobjfinder, table_name, logger): + if dbobjfinder.check_table_exists(table_name): + cursor.execute(f"DROP TABLE {table_name}") + logger.info(f"Dropped table {table_name}") def main(): if len(sys.argv) < 2: @@ -77,7 +73,7 @@ def main(): for x in range(2, 16): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_timestamp = int(prev_day.strftime("%s")) - prev_day_format = prev_day.strftime('%Y%m%d') + prev_day_format = datetime.datetime.utcfromtimestamp(prev_day_timestamp).strftime('%Y%m%d') packet_table = f"packet{prev_day_format}" if track_direct_db_object_finder.check_table_exists(packet_table): @@ -103,13 +99,14 @@ def main(): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}_weather" - drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) + drop_table_if_exists(cursor,track_direct_db_object_finder, packet_table, logger) + # Drop packet_telemetry for x in range(max_days_to_save_telemetry_data, max_days_to_save_telemetry_data + 100): prev_day = datetime.date.today() - datetime.timedelta(x) prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}_telemetry" - drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) + drop_table_if_exists(cursor,track_direct_db_object_finder, packet_table, logger) # Drop packets for x in range(max_days_to_save_position_data, max_days_to_save_position_data + 100): @@ -117,9 +114,9 @@ def main(): prev_day_format = prev_day.strftime('%Y%m%d') packet_table = f"packet{prev_day_format}" - drop_table_if_exists(cursor, f"{packet_table}_ogn", logger, track_direct_db_object_finder) - drop_table_if_exists(cursor, f"{packet_table}_path", logger, track_direct_db_object_finder) - drop_table_if_exists(cursor, packet_table, logger, track_direct_db_object_finder) + drop_table_if_exists(cursor, track_direct_db_object_finder, f"{packet_table}_ogn", logger) + drop_table_if_exists(cursor, track_direct_db_object_finder, f"{packet_table}_path", logger) + drop_table_if_exists(cursor, track_direct_db_object_finder, packet_table, logger) # Delete old stations timestamp_limit = int(time.time()) - (60 * 60 * 24 * max_days_to_save_station_data) @@ -185,3 +182,4 @@ def main(): if __name__ == '__main__': main() + From bb3f755e53227e090f72bca56aaf15baf4ee579b Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Sun, 29 Jun 2025 05:47:53 +0200 Subject: [PATCH 15/18] Update trackdirect-apache.dockerfile --- trackdirect-apache.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackdirect-apache.dockerfile b/trackdirect-apache.dockerfile index ee1a2d4..d86844a 100644 --- a/trackdirect-apache.dockerfile +++ b/trackdirect-apache.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-apache +FROM php:8.4.8-apache RUN apt-get update && apt-get install -y \ git \ From 2ded97a8260d544da1b4fb16e14ed5c2153dedf7 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Sun, 29 Jun 2025 06:07:41 +0200 Subject: [PATCH 16/18] Update trackdirect-apache.dockerfile --- trackdirect-apache.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackdirect-apache.dockerfile b/trackdirect-apache.dockerfile index d86844a..4c16e0e 100644 --- a/trackdirect-apache.dockerfile +++ b/trackdirect-apache.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.4.8-apache +FROM php:8.0-apache RUN apt-get update && apt-get install -y \ git \ From 880504623c0404aedb90a6fffe8e77cda99e7195 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Sun, 29 Jun 2025 06:29:17 +0200 Subject: [PATCH 17/18] Update trackdirect-apache.dockerfile --- trackdirect-apache.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackdirect-apache.dockerfile b/trackdirect-apache.dockerfile index 4c16e0e..d86844a 100644 --- a/trackdirect-apache.dockerfile +++ b/trackdirect-apache.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0-apache +FROM php:8.4.8-apache RUN apt-get update && apt-get install -y \ git \ From 500bd1cb765b223a5ec5af3499ab18e006fa09b1 Mon Sep 17 00:00:00 2001 From: Marcin Czop Date: Sun, 29 Jun 2025 06:31:55 +0200 Subject: [PATCH 18/18] Accept APRSC insecure key --- trackdirect-aprsc.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackdirect-aprsc.dockerfile b/trackdirect-aprsc.dockerfile index 767b287..ed4580c 100644 --- a/trackdirect-aprsc.dockerfile +++ b/trackdirect-aprsc.dockerfile @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y \ gnupg \ && rm -rf /var/lib/apt/lists/* -RUN printf "deb http://aprsc-dist.he.fi/aprsc/apt noble main" >> /etc/apt/sources.list +RUN printf "deb [trusted=yes] http://aprsc-dist.he.fi/aprsc/apt noble main" >> /etc/apt/sources.list RUN gpg --keyserver keyserver.ubuntu.com --recv C51AA22389B5B74C3896EF3CA72A581E657A2B8D RUN gpg --export C51AA22389B5B74C3896EF3CA72A581E657A2B8D | apt-key add -