document how to run webapp with DEBUG=False in local dev environment



a year ago
a year ago


(Reporter: willkg, Assigned: peterbe)


Firefox Tracking Flags

(Not tracked)


There are a few reasons you'd want to run the webapp with DEBUG=False in the local dev environment. For this reason, it's prudent to document how that works and what you need to do to set it up.

The docs for the webapp are here:

This bug covers adding a section on how to run with DEBUG=False to the webapp docs.
Peter: Is this something you could tackle this week? I'm pretty sure it's short, but it'd need to cover overriding the setting (probably in my.env), dealing with static assets, and whatever else that needs to be done.
Flags: needinfo?(peterbe)
Blocks: 1387104

Comment 2

a year ago
First of all, I don't even know how to make that work. 
If you set DEBUG=False in my.env the webapp won't work. You get:

Thing is, I don't know how to run collectstatic so that the files persist.

  ▶ docker-compose run webapp bash
  app@...:/app$ cd webapp-django/
  app@...:/app/webapp-django$ ./ collectstatic --noinput
  app@...:/app/webapp-django$ ls -l /tmp/crashstats-static/
  app@...:/app/webapp-django$ exit

But at this point, when I start the webapp again, aren't the files gone because the container is stopped.
Assignee: nobody → peterbe
Flags: needinfo?(peterbe)

Comment 3

a year ago
Gah! That last comment is wrong and old. I typed it before I dug deeper. Ignore the my last comment. I had it left in my textarea and didn't notice when I saved that I'm assigning it to myself.

Comment 4

a year ago
Commit pushed to master at
fixes bug 1399299 - how to run webapp with DEBUG=False (#3989)

* fixes bug 1399299 - how to run webapp with DEBUG=False

* right file where DEBUG=True comes from


a year ago
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.