mirror of
https://github.com/ION606/static-site-hosting.git
synced 2026-05-14 22:16:54 +00:00
added restart policy
This commit is contained in:
+19
-13
@@ -1,18 +1,24 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
deploy:
|
||||||
- "5121:5121"
|
restart_policy:
|
||||||
networks:
|
condition: on-failure
|
||||||
- static
|
delay: 5s
|
||||||
volumes:
|
max_attempts: 10
|
||||||
- instance:/app/instance
|
window: 120s
|
||||||
- sites:/app/sites
|
ports:
|
||||||
env_file: .env
|
- "5121:5121"
|
||||||
|
networks:
|
||||||
|
- static
|
||||||
|
volumes:
|
||||||
|
- instance:/app/instance
|
||||||
|
- sites:/app/sites
|
||||||
|
env_file: .env
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
static:
|
static:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
instance:
|
instance:
|
||||||
sites:
|
sites:
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ app = create_app()
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True)
|
os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True)
|
||||||
|
print(f"listening on port {config.Config.PORT}")
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
db.create_all()
|
db.create_all()
|
||||||
serve(app, host="0.0.0.0", port=config.Config.PORT)
|
serve(app, host="0.0.0.0", port=config.Config.PORT)
|
||||||
|
|||||||
Reference in New Issue
Block a user