Skip to content

Commit d6a8e47

Browse files
committed
Updates to docker-compose.yaml and README.md to enabled CI and webhook to work as expected
- Update docker-compose.yaml to match service component naming so CI build-and-deploy process builds the expected container images and posts them correctly to the dployment webhook. - Update docker-compose.yaml with additional comments. - Update README.md with additional comments on build-and-deploy process.
1 parent ea6f80b commit d6a8e47

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Each environment is essentially a bunch of different services all governed by `d
203203
- 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.
204204
- CI triggers a webhook that tells the host systems to pull and run new container images and restart any services that have been updated.
205205

206+
**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:
207+
206208
### Control of the deployed environment
207209

208210
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.

docker-compose.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ services:
1818
ports:
1919
- "3306:3306"
2020

21+
# Production service - "service", "image", and "container_name" are important!
2122
sdwebapp:
22-
image: ${REGISTRY}signal_documentation-webapp${TAG}
23+
image: ${REGISTRY}signal_documentation-sdwebapp${TAG}
2324
build:
2425
context: .
2526

2627
env_file:
2728
- ./.env
28-
container_name: signal_documentation-webapp
29+
container_name: signal_documentation-sdwebapp
2930
restart: on-failure
3031
command: sh -c "python3 /usr/src/signal_documentation/src/manage.py migrate --noinput &&
3132
python3 /usr/src/signal_documentation/src/manage.py collectstatic --noinput &&
@@ -47,13 +48,14 @@ services:
4748
restart: always
4849
ports:
4950
- "6379:6379"
50-
51+
52+
# Production service - "service", "image", and "container_name" are important!
5153
sdnginx:
52-
image: ${REGISTRY}signal_documentation-nginx${TAG}
54+
image: ${REGISTRY}signal_documentation-sdnginx${TAG}
5355
build: ./nginx
5456
env_file:
5557
- ./.env
56-
container_name: signal_documentation-nginx
58+
container_name: signal_documentation-sdnginx
5759
restart: on-failure
5860
volumes:
5961
- ./src/staticfiles:/staticfiles
@@ -107,7 +109,7 @@ services:
107109

108110
volumes:
109111
mysql:
110-
webapp:
112+
sdwebapp:
111113
static:
112114
celery:
113115
celery-beat:

0 commit comments

Comments
 (0)