You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*(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
96
99
97
100
The primary use caseforthis will be when making changes to the Nginx container image that runsin production and hosts the static file content, or also if making changes to the Gunicorn config.
98
101
102
+
Additionally, though again not required forlocal development, you can also specify an env var of `MAIN_PAGE = $name`, and the app will be served at `http://localhost:8000/$name` (if runningin debug mode), or if you've set `DEBUG = 'False'` to run it in Nginx/production mode at `http://localhost/$name/`. 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
+
99
106
Changes of this sort should be carefully evaluated as they may require interaction with systems managed by devops folks.
100
107
101
108
## [Django admin](https://docs.djangoproject.com/en/4.1/ref/contrib/admin/) web interface (user should be `is_staff` or `is_superuser`)
@@ -200,9 +207,15 @@ Each environment is essentially a bunch of different services all governed by `d
200
207
201
208
### Basic workflow
202
209
203
-
- 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.
210
+
- A PR merged to either `development`, `staging`, or `main` will trigger CI to build container images that are then tagged with the branch name (or ":latest", in the cast of `main`), and stored in our GitHub Packages container image repository.
204
211
- CI triggers a webhook that tells the host systems to pull and run new container images and restart any services that have been updated.
205
212
213
+
As a developer, your path to getting changes into production should be something like this:
214
+
215
+
- Source your working branch from `development`, do work, PR and merge when complete
216
+
- PR and merge to `staging` in order to get your changes deployed to https://staging.delphi.cmu.edu/signals for review
217
+
- PR and merge to `main` to go to production
218
+
206
219
**IMPORTANT!** - The CI/CD process uses Docker Compose to build the specific container images that will be used in external environments. Success of the the build-and-deploy workflow is dependent on constructed services in `docker-compose.yaml`. If considering making changes there, please have a PR reviewed by devops folks :pray: :pray: :pray:
0 commit comments