Skip to content

Commit fa2235c

Browse files
committed
FLASK_APP not set correctly fix
1 parent 7119491 commit fa2235c

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

.github/INSTALLATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ $ cd src/
2525
3. With `virtual environment` activated, install requirements, init db,
2626

2727
```bash
28-
[venv]$ pip install -r requirements.txt
28+
[venv]$ pip install -r requirements.txt
29+
[venv]$ export FLASK_APP="FlaskRTBCTF:create_app()"
2930
[venv]$ chmod +x init_db.sh && ./init_db.sh # Only required on first run
3031
```
3132

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
}
3434
},
3535
"scripts": {
36-
"postdeploy": "bash src/init_db.sh"
36+
"postdeploy": "cd /app/src && export FLASK_APP='FlaskRTBCTF:create_app()' && sh init_db.sh"
3737
}
3838
}

runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.8.2
1+
python-3.8.3

src/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
chmod +x init_db.sh runserver.sh
4+
export FLASK_APP="FlaskRTBCTF:create_app()"
45
# init/ migrate DB
56
./init_db.sh
67
# run gunicorn production server

src/init_db.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
22

3-
export FLASK_APP="FlaskRTBCTF:create_app()"
43
flask db init
54
flask db migrate
65
flask db upgrade

0 commit comments

Comments
 (0)