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:
@@ -430,6 +430,12 @@ 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"
|
||||||
|
|||||||
@@ -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://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">
|
||||||
|
|||||||
+13
-30
@@ -1,18 +1,16 @@
|
|||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
#image: ghcr.io/zeecka/aperisolve:latest
|
image: ghcr.io/zeecka/aperisolve:prod
|
||||||
build: .
|
#build: .
|
||||||
container_name: aperisolve-web
|
container_name: aperisolve-web
|
||||||
restart: no
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "80:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- apresults:/app/aperisolve/results
|
- apresults:/aperisolve/results
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
initdb:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
redis:
|
redis:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
worker:
|
worker:
|
||||||
@@ -27,22 +25,20 @@ services:
|
|||||||
start_period: 900s
|
start_period: 900s
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
#image: ghcr.io/zeecka/aperisolve:latest
|
image: ghcr.io/zeecka/aperisolve:prod
|
||||||
build: .
|
#build: .
|
||||||
container_name: aperisolve-worker
|
container_name: aperisolve-worker
|
||||||
restart: no
|
restart: always
|
||||||
command: rq worker default --url redis://redis:6379/0
|
command: rq worker default --url redis://redis:6379/0
|
||||||
volumes:
|
volumes:
|
||||||
- apresults:/app/aperisolve/results
|
- apresults:/aperisolve/results
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
- redis
|
||||||
condition: service_healthy
|
- postgres
|
||||||
initdb:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
redis:
|
|
||||||
condition: service_started
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
environment:
|
||||||
|
- CLEAR_AT_RESTART=0 # Always false for worker to prevent double clearing
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:18
|
image: postgres:18
|
||||||
@@ -58,19 +54,6 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .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:
|
redis:
|
||||||
image: redis:7
|
image: redis:7
|
||||||
container_name: redis
|
container_name: redis
|
||||||
|
|||||||
Reference in New Issue
Block a user