Skip to content

Commit ec62dbb

Browse files
authored
docs: update python example to use FLASK_DEBUG (tilt-dev#1143)
newer versions of flask use this instead of FLASK_ENV for live reloads Signed-off-by: Nick Santos <nick.santos@docker.com>
1 parent 16875c8 commit ec62dbb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/example_python.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ With Tilt, we can skip all of these steps, and instead
214214
```python
215215
# Add a live_update rule to our docker_build
216216
congrats = "🎉 Congrats, you ran a live_update! 🎉"
217-
docker_build('example-python-image', '.', build_args={'flask_env': 'development'},
217+
docker_build('example-python-image', '.', build_args={'flask_debug': 'True'},
218218
live_update=[
219219
sync('.', '/app'),
220220
run('cd /app && pip install -r requirements.txt',
@@ -238,12 +238,12 @@ When a `live_update` is triggered, Tilt will, in order:
238238
3. Poke `app.py` if necessary to make sure that Flask reloads the server
239239
4. Congratulate you on finishing this guide!
240240

241-
The second additional parameter, `build_args={'flask_env': 'development'}`, corresponds to this Dockerfile change:
241+
The second additional parameter, `build_args={'flask_debug': 'True'}`, corresponds to this Dockerfile change:
242242
```
243243
# Default value; will be overridden by build-args, if passed
244-
ARG flask_env=production
244+
ARG flask_debug=False
245245
246-
ENV FLASK_ENV $flask_env
246+
ENV FLASK_DEBUG $flask_debug
247247
```
248248
Together, these changes mean that when we build this Dockerfile via this Tiltfile, our Flask app will run in development mode. When in development mode, Flask watches for file changes and reloads the server when necessary.
249249

0 commit comments

Comments
 (0)