Skip to content

Commit f015d14

Browse files
committed
Bind gunicorn to wsgi enntrypoint
1 parent a304f6d commit f015d14

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.env.dev

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://postgres:postgres@db/flashlearn
22
SQL_HOST=db
33
SQL_PORT=5432
44
DATABASE=postgres
5+
POSTGRES_USER=postgres
6+
POSTGRES_PASSWORD=postgres
7+
POSTGRES_DB=flashlearn

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ htmlcov
1010
.pytest_cache
1111
postgres-data
1212
.env.prod
13+
.env.prod.db

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ then
1212
fi
1313

1414
python -m flask db upgrade
15-
python -m flask run --host=0.0.0.0
15+
gunicorn --bind 0.0.0.0:5000 wsgi:app
1616

1717
exec "$@"

wsgi.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from flashlearn import create_app
2+
3+
app = create_app()
4+
5+
if __name__ == "__main__":
6+
app.run()

0 commit comments

Comments
 (0)