diff options
author | 2021-09-05 07:43:44 -0400 | |
---|---|---|
committer | 2021-09-05 07:43:44 -0400 | |
commit | 12c09e08ca50a271372adeaf0cb21d6c4ca9ccea (patch) | |
tree | 1ac76fddbc476001133aac2f55e414269de47744 /manage.py | |
parent | Add `tutorial` and `video` tags for RealPython. (diff) | |
parent | Merge pull request #581 from python-discord/Pin-platform-in-Dockerfile (diff) |
Merge with main, resolve conflicts.
Diffstat (limited to 'manage.py')
-rwxr-xr-x | manage.py | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -138,10 +138,17 @@ class SiteManager: print("Applying migrations.") call_command("migrate", verbosity=self.verbosity) - print("Collecting static files.") - call_command("collectstatic", interactive=False, clear=True, verbosity=self.verbosity) if self.debug: + # In Production, collectstatic is ran in the Docker image + print("Collecting static files.") + call_command( + "collectstatic", + interactive=False, + clear=True, + verbosity=self.verbosity - 1 + ) + self.set_dev_site_name() self.create_superuser() @@ -169,12 +176,10 @@ class SiteManager: "--preload", "-b", "0.0.0.0:8000", "pydis_site.wsgi:application", - "--threads", "8", "-w", "2", - "--max-requests", "1000", - "--max-requests-jitter", "50", "--statsd-host", "graphite.default.svc.cluster.local:8125", "--statsd-prefix", "site", + "--config", "file:gunicorn.conf.py" ] # Run gunicorn for the production server. |