Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

Task/mdot redirect #340

Merged
merged 4 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:

jobs:
context:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

outputs:
commit_hash: ${{ steps.context.outputs.commit_hash }}
Expand All @@ -62,18 +62,18 @@ jobs:
release_name: ${{ env.RELEASE_NAME }}

build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

needs: context

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'

- name: Run Python Linters
uses: uw-it-aca/actions/python-linters@main
Expand All @@ -82,18 +82,18 @@ jobs:
exclude_paths: 'migrations'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-$(echo ${{ hashFiles('Dockerfile') }} | head -c 16)
restore-keys: |
${{ runner.os }}-buildx-

- name: Build App Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
target: app-container
Expand All @@ -104,7 +104,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Build Test Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
target: app-test-container
tags: app-test-container
Expand Down Expand Up @@ -146,11 +146,11 @@ jobs:
outputs:
context: ${{ steps.context.outputs.context }}

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Deployment Pipeline
if: >-
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:

needs: [context, build, deploy]

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: House Keeping
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG DJANGO_CONTAINER_VERSION=1.4.2
ARG DJANGO_CONTAINER_VERSION=2.0.3

FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} as app-container
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} AS app-container

USER root
RUN apt-get update && apt-get install libpq-dev -y
Expand All @@ -20,7 +20,7 @@ RUN . /app/bin/activate && pip install nodeenv && nodeenv -p &&\
RUN . /app/bin/activate && python manage.py collectstatic --noinput &&\
python manage.py compress -f

FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-test-container:${DJANGO_CONTAINER_VERSION} as app-test-container
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-test-container:${DJANGO_CONTAINER_VERSION} AS app-test-container

COPY --from=app-container /app/ /app/
COPY --from=app-container /static/ /static/
4 changes: 1 addition & 3 deletions docker/prod-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ ingress:
nginx.ingress.kubernetes.io/ssl-ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256"
nginx.ingress.kubernetes.io/client-body-buffer-size: "16K"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($host != 'mobile.uw.edu' ) {
return 301 $scheme://mobile.uw.edu$request_uri;
}
return 301 https://www.washington.edu/mobile/;
lifecycle:
enabled: true
preStop:
Expand Down
4 changes: 1 addition & 3 deletions docker/test-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ ingress:
nginx.ingress.kubernetes.io/ssl-ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256"
nginx.ingress.kubernetes.io/client-body-buffer-size: "16K"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($host != 'test.mdot.uw.edu' ) {
return 301 $scheme://test.mdot.uw.edu$request_uri;
}
return 301 https://www.washington.edu/mobile/;
lifecycle:
enabled: true
preStop:
Expand Down