Skip to content

Commit 8381a7b

Browse files
committed
Updates the README
- Adds additional development process information - Adds information about deployment
1 parent 6075940 commit 8381a7b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,25 @@ $ docker-compose up
7777

7878
Open `http://localhost:8000` to view it in the browser
7979

80+
### To run via docker and emulate production
81+
82+
Though probably not necessary in most cases, if you want to test/modify/emulate how this will run in production you can:
83+
84+
- In `.env` set:
85+
```
86+
DEBUG = 'False'
87+
```
88+
- Modify the app container's command in `docker-compose.yaml` to run:
89+
```
90+
gunicorn signal_documentation.wsgi:application --bind 0.0.0.0:8000"
91+
92+
*(Essentially you'll replace just the last line of the command, switching out the "runserver" line)
93+
```
94+
95+
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.
96+
97+
Changes of this sort should be carefully evaluated as they may require interaction with systems managed by devops/sysops folks.
98+
8099
## [Django admin](https://docs.djangoproject.com/en/4.1/ref/contrib/admin/) web interface (user should be `is_staff` or `is_superuser`)
81100
`http://localhost:8000/admin`
82101

@@ -126,3 +145,22 @@ Othervice you will receive Errors during import process:
126145
3. Import `Signal.base` fields with `SignalBaseResource` - [http://localhost:8000/admin/signals/signal/import/](http://localhost:8000/admin/signals/signal/import/)
127146
![Import `Signal.base` field](./docs/image-5.png)
128147
![Confirm importing `Signal.base` fields](./docs/image-6.png)
148+
149+
## Deployment
150+
151+
This application gets deployed (at a minimum) to two environmetns:
152+
153+
Production - <https://delphi.cmu.edu/{app_name}>
154+
155+
Staging - <https://staging.delphi.cmu.edu/{app_name}>
156+
157+
Each environment is essentially a bunch of different services all governed by `docker-compose`, running across multiple hosts, with various layering of proxies and load balancers.
158+
159+
### Basic workflow
160+
161+
- A PR merged to either `development` or `master` will trigger CI to build container images that are then tagged (based on the branch name and ":latest" respectively) and stored in our GitHub Packages container image repository.
162+
- CI triggers a webhook that tells the host systems to pull and run new container images and restart any services that have been updated.
163+
164+
### Control of the deployed environment
165+
166+
The environment and secrets used for deployment live in <https://github.com/cmu-delphi/delphi-ansible-web>. Any changes to the environment should be made there and then tested and validated by DevOps folks.

0 commit comments

Comments
 (0)