Skip to content

Commit

Permalink
azure deployment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed Nov 5, 2023
1 parent a07030d commit 01a0143
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
17 changes: 17 additions & 0 deletions prod_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import click

from website.app import create_app
from website.config import BaseConfig


@click.command()
@click.option("--db", default="sqlite:///local.db")
@click.option("--secret-key", default="secret@!%(@!%!@)*(#$)*$@!)*@!%)*@!)*&%@!132509831207549035213028579674138")
def cmd(db, secret_key):
BaseConfig.SECRET_KEY = secret_key
BaseConfig.SQLALCHEMY_DATABASE_URI = db
create_app().run(debug=False, host="0.0.0.0", threaded=False)


if __name__ == "__main__":
cmd()
8 changes: 2 additions & 6 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@
@click.command()
@click.option("--debug", is_flag=True)
@click.option("--port", default=5000)
@click.option("--host")
@click.option("--threaded", is_flag=True)
@click.option("--db", default="sqlite:///local.db")
@click.option("--secret-key", default="secret@!%(@!%!@)*(#$)*$@!)*@!%)*@!)*&%@!132509831207549035213028579674138")
def cmd(debug, port, host, threaded, db, secret_key):
def cmd(debug, port, threaded, db, secret_key):
BaseConfig.SECRET_KEY = secret_key
BaseConfig.SQLALCHEMY_DATABASE_URI = db
if host is None:
create_app().run(debug=debug, port=port, threaded=threaded)
else:
create_app().run(debug=debug, host=host, threaded=threaded)
create_app().run(debug=debug, port=port, threaded=threaded)


if __name__ == "__main__":
Expand Down

0 comments on commit 01a0143

Please sign in to comment.