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

RESOLVED FIXED

Status

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: willkg, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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:

http://socorro.readthedocs.io/en/latest/components/webapp.html

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
(Assignee)

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: https://gist.github.com/peterbe/4385ef0f3a702cea65629e4a7b9c3109

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$ ./manage.py 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)
(Assignee)

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 https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/c6ed2d663e2cfdc009766469d4ad6714c34e4ed8
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

Updated

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