-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds config to run locally without docker in a VSCode context Running the app locally without docker allows better debugging and avoiding docker-related issues. Closes #84. * Adds .env.example * Adds gunicorn and python-dotenv dependencies * Adds gunicorn as a dependency as well as a VSCode launch config for running it locally in cases where we want to run local tests with a more production-like performance load. * Removes unused import. * Removes failing unneeded spec for detecting PYTHON_VERSION in environment * Adds pre-commit package to project to use ggshield * Remove password from .env.example It was just a dummy password, but trying to avoid triggering a GitGuardian alert. Will install ggshield pre-commit hook in upcoming PR. * Use 0.0.0.0 for localhost in launch config * Standardizes dev to port 8000 * Migrates to pytest, add dotenv to settings --------- Co-authored-by: Harpo Harbert <ryan_harbert@wgbh.org>
- Loading branch information
Showing
15 changed files
with
164 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
OV_DB_ENGINE=django.db.backends.postgresql | ||
OV_DB_HOST=0.0.0.0 | ||
OV_DB_PORT=5432 | ||
OV_DB_NAME=postgres | ||
OV_DB_USER=postgres | ||
OV_DB_PASSWORD="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"inputs": [ | ||
{ | ||
"id": "numWorkers", | ||
"type": "promptString", | ||
"default": "4", | ||
"description": "Number of Gunicorn workers to run" | ||
} | ||
], | ||
"configurations": [ | ||
{ | ||
"name": "OV Wagtail - Django dev server", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/manage.py", | ||
"args": [ | ||
"runserver", | ||
"0.0.0.0:8000" | ||
], | ||
"django": true, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "OV Wagtail - Gunicorn", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "gunicorn", | ||
"args": [ | ||
"-w ${input:numWorkers}", | ||
"-b 0.0.0.0:4000", | ||
"ov-wag.wsgi:applications", | ||
], | ||
"django": true, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Run Migrations", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/manage.py", | ||
"args": [ | ||
"migrate", | ||
"--noinput" | ||
], | ||
"django": true, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Run Tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/manage.py", | ||
"args": [ | ||
"test", | ||
], | ||
"django": true, | ||
"justMyCode": false | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"-v", | ||
], | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.unittestEnabled": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ services: | |
- .env | ||
db: | ||
env_file: | ||
- .db | ||
- .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from .base import * | ||
from os import environ | ||
from ov_wag.settings.base import * | ||
|
||
DEBUG = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters