Skip to content

Commit

Permalink
Merge branch 'release/0.19.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed May 9, 2022
2 parents 6c44330 + 58bec0a commit 29aba14
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog

## 0.19.1

- Remove Django prepend www URL setting as this is handled by the swarm proxy.
- Modify swarm proxy prepend www URL setting to skip production testing URL.
- Fix case of environment variable name.
- Remove unused GAE cron job setting.

## 0.19.0

- Move website from Google Cloud Platform to Docker Swarm hosted at the University of Canterbury.
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.prod.yml
Expand Up @@ -15,7 +15,7 @@ x-django-config:
&django-config
image: ghcr.io/uccser/dthm4kaiako:${DTHM4KAIAKO_IMAGE_TAG}
environment:
dthm4kaiako_DOMAIN: ${DTHM4KAIAKO_DOMAIN}
DTHM4KAIAKO_DOMAIN: ${DTHM4KAIAKO_DOMAIN}
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
DEPLOYMENT_ENVIRONMENT_FILE: /dthm4kaiako_deployment_environment
Expand Down Expand Up @@ -71,8 +71,8 @@ services:
- "traefik.http.routers.dthm4kaiako-django.rule=${DTHM4KAIAKO_ROUTER_RULE}"
- "traefik.http.routers.dthm4kaiako-django.entryPoints=web"
# Redirect non-www to www, only triggers in production swarm.
- "traefik.http.middlewares.dthm4kaiako-redirect-non-www.redirectregex.regex=^https://dthm4kaiako(.*)"
- "traefik.http.middlewares.dthm4kaiako-redirect-non-www.redirectregex.replacement=https://www.dthm4kaiako$${1}"
- "traefik.http.middlewares.dthm4kaiako-redirect-non-www.redirectregex.regex=^https://dthm4kaiako.ac.nz(.*)"
- "traefik.http.middlewares.dthm4kaiako-redirect-non-www.redirectregex.replacement=https://www.dthm4kaiako.ac.nz$${1}"
- "traefik.http.middlewares.dthm4kaiako-redirect-non-www.redirectregex.permanent=true"
networks:
- uccser-public
Expand Down
2 changes: 1 addition & 1 deletion dthm4kaiako/config/__init__.py
@@ -1,6 +1,6 @@
"""Configuration for Django system."""

__version__ = "0.19.0"
__version__ = "0.19.1"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
Expand Down
13 changes: 0 additions & 13 deletions dthm4kaiako/config/settings/production.py
Expand Up @@ -25,19 +25,6 @@
SECRET_KEY = file.read().strip()


# URL Configuration
# ------------------------------------------------------------------------------

if PRODUCTION_ENVIRONMENT: # noqa: F405
PREPEND_WWW = True
else:
PREPEND_WWW = False

# Exempt Google App Engine cron job URLs from HTTPS to function correctly.
SECURE_REDIRECT_EXEMPT = [
r'^/?cron/.*',
]

# DATABASE CONFIGURATION
# ----------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
Expand Down

0 comments on commit 29aba14

Please sign in to comment.