Skip to content

Commit 3d134a1

Browse files
committed
Updates the README to include some notes about testing the Nginx proxy config, as well as some notes about using the MAIN_PAGE env var. These options are typically only going to be used in production/non-dev environments.
1 parent 9154e1a commit 3d134a1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ Open `http://localhost:8000` to view it in the browser
8282
Though probably not necessary in most cases, if you want to test/modify/emulate how this will run in production you can:
8383

8484
- In `.env` set:
85-
```
85+
86+
```shell
8687
DEBUG = 'False'
8788
```
89+
8890
- Modify the app container's command in `docker-compose.yaml` to run:
89-
```
91+
92+
```shell
9093
gunicorn signal_documentation.wsgi:application --bind 0.0.0.0:8000"
9194
9295
*(Essentially you'll replace just the last line of the command, switching out the "runserver" line)
@@ -96,6 +99,10 @@ Open `http://localhost` to view it in the browser. In this usage your request wi
9699
97100
The primary use case for this will be when making changes to the Nginx container image that runs in production and hosts the static file content, or also if making changes to the Gunicorn config.
98101
102+
Additionally, though again not required for local development, you can also specify an env var of `MAIN_PAGE = $name`, and the app will be served at `http://localhost:8000/$string` (if running in debug mode), or if you've set `DEBUG = 'False'` to run it in Nginx/production mode at `http://localhost/$string/`. Note the ending slash when in Nginx/production mode _and_ using the `MAIN_PAGE` env var.
103+
104+
The primary use case is so that we have flexibility to serve the application at something other than the "bare" URL, though doing this is not necessary for local development.
105+
99106
Changes of this sort should be carefully evaluated as they may require interaction with systems managed by devops folks.
100107
101108
## [Django admin](https://docs.djangoproject.com/en/4.1/ref/contrib/admin/) web interface (user should be `is_staff` or `is_superuser`)

0 commit comments

Comments
 (0)