From ef0b6ca511ae04660cb8e43ed89ba81a650486ba Mon Sep 17 00:00:00 2001 From: Zeecka Date: Fri, 9 Jan 2026 23:07:45 +0100 Subject: [PATCH] Fix to get merge into main --- .github/workflows/release.yml | 11 +++++------ aperisolve/app.py | 6 ------ aperisolve/templates/base.html | 4 +--- compose.yml | 18 ++++++++++++++++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a824f54..1ee42c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,6 @@ jobs: push: true tags: | ghcr.io/${{ env.lower_actor }}/aperisolve:${{ env.RELEASE_VERSION }} - ghcr.io/${{ env.lower_actor }}/aperisolve:latest-prod ghcr.io/${{ env.lower_actor }}/aperisolve:prod # Build and push for MAIN tags (X.X.X) @@ -94,10 +93,10 @@ jobs: # This prevents deployment if the same commit exists on multiple branches PROD_HEAD=$(git rev-parse origin/prod) TAG_COMMIT=$(git rev-parse HEAD) - + echo "Prod HEAD: $PROD_HEAD" echo "Tag commit: $TAG_COMMIT" - + if [ "$PROD_HEAD" = "$TAG_COMMIT" ]; then echo "is_prod=true" >> $GITHUB_OUTPUT echo "✅ Tag is at prod branch HEAD - will deploy" @@ -110,12 +109,12 @@ jobs: echo "❌ Tag is not from prod branch - skipping deployment" fi - # wait for 30 seconds + # wait for 120 seconds - name: Wait for image propagation if: steps.check.outputs.is_prod == 'true' run: | - echo "Waiting 30 seconds for image to propagate in registry..." - sleep 30 + echo "Waiting 120 seconds for image to propagate in registry..." + sleep 120 - name: Deploy to production server if: steps.check.outputs.is_prod == 'true' diff --git a/aperisolve/app.py b/aperisolve/app.py index a55e979..92852ef 100644 --- a/aperisolve/app.py +++ b/aperisolve/app.py @@ -430,12 +430,6 @@ def create_app() -> Flask: return app -@app.route("/ads.txt") -def google_ads() -> str: - """Google Ads required file""" - return "google.com, pub-2324718887045017, DIRECT, f08c47fec0942fa0" - - if __name__ == "__main__": my_app = create_app() debug_mode = os.environ.get("FLASK_DEBUG", "0") == "1" diff --git a/aperisolve/templates/base.html b/aperisolve/templates/base.html index 2e2647a..5e4a155 100644 --- a/aperisolve/templates/base.html +++ b/aperisolve/templates/base.html @@ -10,8 +10,6 @@ - @@ -41,4 +39,4 @@ {% include "footer.html" %} - \ No newline at end of file + diff --git a/compose.yml b/compose.yml index 90959b3..58fb1b0 100644 --- a/compose.yml +++ b/compose.yml @@ -1,6 +1,6 @@ services: web: - image: ghcr.io/zeecka/aperisolve:prod + image: ghcr.io/zeecka/aperisolve:latest #build: . container_name: aperisolve-web restart: always @@ -25,7 +25,7 @@ services: start_period: 900s worker: - image: ghcr.io/zeecka/aperisolve:prod + image: ghcr.io/zeecka/aperisolve:latest #build: . container_name: aperisolve-worker restart: always @@ -40,6 +40,20 @@ services: environment: - CLEAR_AT_RESTART=0 # Always false for worker to prevent double clearing + initdb: + image: ghcr.io/zeecka/aperisolve:latest + #build: . + container_name: aperisolve-initdb + command: python -m aperisolve.utils.init_db + volumes: + - apresults:/aperisolve/results + depends_on: + postgres: + condition: service_healthy + env_file: + - .env.example + restart: "no" + postgres: image: postgres:18 container_name: postgres