Fix to get merge into main

This commit is contained in:
Zeecka
2026-01-09 23:07:45 +01:00
parent 7f13c9841c
commit ef0b6ca511
4 changed files with 22 additions and 17 deletions
+5 -6
View File
@@ -52,7 +52,6 @@ jobs:
push: true push: true
tags: | tags: |
ghcr.io/${{ env.lower_actor }}/aperisolve:${{ env.RELEASE_VERSION }} ghcr.io/${{ env.lower_actor }}/aperisolve:${{ env.RELEASE_VERSION }}
ghcr.io/${{ env.lower_actor }}/aperisolve:latest-prod
ghcr.io/${{ env.lower_actor }}/aperisolve:prod ghcr.io/${{ env.lower_actor }}/aperisolve:prod
# Build and push for MAIN tags (X.X.X) # 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 # This prevents deployment if the same commit exists on multiple branches
PROD_HEAD=$(git rev-parse origin/prod) PROD_HEAD=$(git rev-parse origin/prod)
TAG_COMMIT=$(git rev-parse HEAD) TAG_COMMIT=$(git rev-parse HEAD)
echo "Prod HEAD: $PROD_HEAD" echo "Prod HEAD: $PROD_HEAD"
echo "Tag commit: $TAG_COMMIT" echo "Tag commit: $TAG_COMMIT"
if [ "$PROD_HEAD" = "$TAG_COMMIT" ]; then if [ "$PROD_HEAD" = "$TAG_COMMIT" ]; then
echo "is_prod=true" >> $GITHUB_OUTPUT echo "is_prod=true" >> $GITHUB_OUTPUT
echo "✅ Tag is at prod branch HEAD - will deploy" echo "✅ Tag is at prod branch HEAD - will deploy"
@@ -110,12 +109,12 @@ jobs:
echo "❌ Tag is not from prod branch - skipping deployment" echo "❌ Tag is not from prod branch - skipping deployment"
fi fi
# wait for 30 seconds # wait for 120 seconds
- name: Wait for image propagation - name: Wait for image propagation
if: steps.check.outputs.is_prod == 'true' if: steps.check.outputs.is_prod == 'true'
run: | run: |
echo "Waiting 30 seconds for image to propagate in registry..." echo "Waiting 120 seconds for image to propagate in registry..."
sleep 30 sleep 120
- name: Deploy to production server - name: Deploy to production server
if: steps.check.outputs.is_prod == 'true' if: steps.check.outputs.is_prod == 'true'
-6
View File
@@ -430,12 +430,6 @@ def create_app() -> Flask:
return app return app
@app.route("/ads.txt")
def google_ads() -> str:
"""Google Ads required file"""
return "google.com, pub-2324718887045017, DIRECT, f08c47fec0942fa0"
if __name__ == "__main__": if __name__ == "__main__":
my_app = create_app() my_app = create_app()
debug_mode = os.environ.get("FLASK_DEBUG", "0") == "1" debug_mode = os.environ.get("FLASK_DEBUG", "0") == "1"
+1 -3
View File
@@ -10,8 +10,6 @@
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" /> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="/static/css/aperisolve.css" rel="stylesheet" /> <link href="/static/css/aperisolve.css" rel="stylesheet" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2324718887045017"
crossorigin="anonymous"></script>
</head> </head>
<body class="text-light"> <body class="text-light">
@@ -41,4 +39,4 @@
{% include "footer.html" %} {% include "footer.html" %}
</body> </body>
</html> </html>
+16 -2
View File
@@ -1,6 +1,6 @@
services: services:
web: web:
image: ghcr.io/zeecka/aperisolve:prod image: ghcr.io/zeecka/aperisolve:latest
#build: . #build: .
container_name: aperisolve-web container_name: aperisolve-web
restart: always restart: always
@@ -25,7 +25,7 @@ services:
start_period: 900s start_period: 900s
worker: worker:
image: ghcr.io/zeecka/aperisolve:prod image: ghcr.io/zeecka/aperisolve:latest
#build: . #build: .
container_name: aperisolve-worker container_name: aperisolve-worker
restart: always restart: always
@@ -40,6 +40,20 @@ services:
environment: environment:
- CLEAR_AT_RESTART=0 # Always false for worker to prevent double clearing - 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: postgres:
image: postgres:18 image: postgres:18
container_name: postgres container_name: postgres