added restart policy

This commit is contained in:
ION606
2025-11-12 10:37:09 -05:00
parent 23b5468d42
commit 0b15d653c5
2 changed files with 21 additions and 13 deletions
+6
View File
@@ -1,6 +1,12 @@
services:
app:
build: .
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 10
window: 120s
ports:
- "5121:5121"
networks:
+2
View File
@@ -6,6 +6,8 @@ app = create_app()
if __name__ == "__main__":
os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True)
print(f"listening on port {config.Config.PORT}")
with app.app_context():
db.create_all()
serve(app, host="0.0.0.0", port=config.Config.PORT)