Skip to content

Commit b7c44ce

Browse files
authored
Merge pull request #4 from ieeeuoft/aws2026-update
Update deployment files
2 parents 0d4db88 + ceab290 commit b7c44ce

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
GITHUB_SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-7)
2525
echo "GITHUB_SHA_SHORT=${GITHUB_SHA_SHORT}" >> $GITHUB_ENV
2626
echo "::set-output name=GITHUB_SHA_SHORT::${GITHUB_SHA_SHORT}"
27+
- name: Set lowercase image name
28+
run: echo "IMAGE_NAME_LOWER=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2729
- name: Build image
2830
run: docker compose -f deployment/docker-compose.ci.yml build
2931
- name: Docker login
@@ -49,6 +51,8 @@ jobs:
4951

5052
steps:
5153
- uses: actions/checkout@v3
54+
- name: Set lowercase image name
55+
run: echo "IMAGE_NAME_LOWER=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
5256
- name: Set up Python 3.9
5357
uses: actions/setup-python@v1
5458
with:
@@ -139,6 +143,6 @@ jobs:
139143
# TODO: It would be better to use docker-compose against the django service,
140144
# but there is currently a bug in docker-compose preventing running services
141145
# over an SSH host.
142-
IMAGE=${REGISTRY}/${IMAGE_NAME}/django:${GITHUB_SHA_SHORT}
146+
IMAGE=${REGISTRY}/${IMAGE_NAME_LOWER}/django:${GITHUB_SHA_SHORT}
143147
docker run --rm --env-file .env ${IMAGE} python manage.py migrate
144148
echo "Deployment complete"

deployment/docker-compose.ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
version: "3.8"
2-
31
services:
42
django:
53
build:
64
context: ..
75
dockerfile: ./deployment/Dockerfile
8-
image: ${REGISTRY}/${IMAGE_NAME}/django:${GITHUB_SHA_SHORT}
6+
image: ${REGISTRY}/${IMAGE_NAME_LOWER}/django:${GITHUB_SHA_SHORT}

deployment/docker-compose.prod.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
version: "3.8"
2-
31
services:
42
django:
5-
image: ${REGISTRY}/${IMAGE_NAME}/django:${GITHUB_SHA_SHORT}
3+
image: ${REGISTRY}/${IMAGE_NAME_LOWER}/django:${GITHUB_SHA_SHORT}
64
command: gunicorn hackathon_site.wsgi:application --bind 0.0.0.0:8000 --workers 5 --capture-output --access-logfile - --error-logfile -
75
ports:
86
- "8000:8000"

0 commit comments

Comments
 (0)