Merge upstream/prod - combine build and deploy workflows

- Merged deployement.yml into release.yml
- Added prod/main tag differentiation for Docker images
- Added HEAD check for prod branch deployment
- Added 30s delay for image propagation
This commit is contained in:
aradhyacp
2026-01-10 00:28:02 +05:30
3 changed files with 21 additions and 30 deletions
+6
View File
@@ -430,6 +430,12 @@ 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"
+2
View File
@@ -10,6 +10,8 @@
<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="/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>
<body class="text-light">
+13 -30
View File
@@ -1,18 +1,16 @@
services:
web:
#image: ghcr.io/zeecka/aperisolve:latest
build: .
image: ghcr.io/zeecka/aperisolve:prod
#build: .
container_name: aperisolve-web
restart: no
restart: always
ports:
- "5000:5000"
- "80:5000"
volumes:
- apresults:/app/aperisolve/results
- apresults:/aperisolve/results
depends_on:
postgres:
condition: service_healthy
initdb:
condition: service_completed_successfully
redis:
condition: service_started
worker:
@@ -27,22 +25,20 @@ services:
start_period: 900s
worker:
#image: ghcr.io/zeecka/aperisolve:latest
build: .
image: ghcr.io/zeecka/aperisolve:prod
#build: .
container_name: aperisolve-worker
restart: no
restart: always
command: rq worker default --url redis://redis:6379/0
volumes:
- apresults:/app/aperisolve/results
- apresults:/aperisolve/results
depends_on:
postgres:
condition: service_healthy
initdb:
condition: service_completed_successfully
redis:
condition: service_started
- redis
- postgres
env_file:
- .env
environment:
- CLEAR_AT_RESTART=0 # Always false for worker to prevent double clearing
postgres:
image: postgres:18
@@ -58,19 +54,6 @@ services:
env_file:
- .env
initdb:
build: .
container_name: aperisolve-initdb
command: python -m aperisolve.utils.init_db
volumes:
- apresults:/app/aperisolve/results
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
restart: "no"
redis:
image: redis:7
container_name: redis