Skip to content

Commit 030d0f9

Browse files
authored
Merge pull request #84 from cmu-delphi/fix-ci-and-webhook
Fix a naming mismatch so that container deployments work
2 parents b6aa998 + 38bd04a commit 030d0f9

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-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: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ services:
1818
ports:
1919
- "3306:3306"
2020

21+
# Production service - "service", "image", and "container_name" should all contain the same
22+
# reference, based on the name of the service.
2123
sdwebapp:
22-
image: ${REGISTRY}signal_documentation-webapp${TAG}
24+
image: ${REGISTRY}signal_documentation-sdwebapp${TAG}
2325
build:
2426
context: .
2527

2628
env_file:
2729
- ./.env
28-
container_name: signal_documentation-webapp
30+
container_name: signal_documentation-sdwebapp
2931
restart: on-failure
3032
command: sh -c "python3 /usr/src/signal_documentation/src/manage.py migrate --noinput &&
3133
python3 /usr/src/signal_documentation/src/manage.py collectstatic --noinput &&
@@ -47,13 +49,15 @@ services:
4749
restart: always
4850
ports:
4951
- "6379:6379"
50-
52+
53+
# Production service - "service", "image", and "container_name" should all contain the same
54+
# reference, based on the name of the service.
5155
sdnginx:
52-
image: ${REGISTRY}signal_documentation-nginx${TAG}
56+
image: ${REGISTRY}signal_documentation-sdnginx${TAG}
5357
build: ./nginx
5458
env_file:
5559
- ./.env
56-
container_name: signal_documentation-nginx
60+
container_name: signal_documentation-sdnginx
5761
restart: on-failure
5862
volumes:
5963
- ./src/staticfiles:/staticfiles
@@ -107,7 +111,7 @@ services:
107111

108112
volumes:
109113
mysql:
110-
webapp:
114+
sdwebapp:
111115
static:
112116
celery:
113117
celery-beat:

0 commit comments

Comments
 (0)