-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docker' of https://github.com/skytreader/alexandria int…
…o docker
- Loading branch information
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ services: | |
- "3306:3306" | ||
web: | ||
build: . | ||
command: python run.py | ||
ports: | ||
- "80:7070" | ||
volumes: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import librarian | ||
from config import APP_HOST, APP_PORT, DEVEL | ||
|
||
import time | ||
import traceback | ||
|
||
if __name__ == "__main__": | ||
librarian.init_blueprints() | ||
librarian.init_db() | ||
librarian.app.run(host=APP_HOST, port=APP_PORT, debug=DEVEL) | ||
while True: | ||
try: | ||
librarian.init_blueprints() | ||
librarian.init_db() | ||
librarian.app.run(host=APP_HOST, port=APP_PORT, debug=DEVEL) | ||
except Exception: | ||
traceback.print_exc() | ||
print "Can't start app, retrying..." | ||
time.sleep(3) |