diff options
author | Matthew Lemon <y@yulqen.org> | 2025-01-05 21:29:06 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2025-01-05 21:29:06 +0000 |
commit | 610e43b39987172e38e0b8b7de869ac5ecc68cad (patch) | |
tree | 24d5a19dee783fd2871f41e53505fe1b1e0dafeb | |
parent | 1b08e7c8e35f1be532b5dca377f83662c21943a1 (diff) |
Switched to prod settings for staging
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 6 | ||||
-rw-r--r-- | config/settings/production.py | 8 | ||||
-rw-r--r-- | docker-compose.yaml | 3 |
3 files changed, 12 insertions, 5 deletions
@@ -20,12 +20,12 @@ ADD . /app WORKDIR /app # Make port 8010 available to the world outside this container -EXPOSE 8010 +EXPOSE 8020 # Define environment variable -ENV DJANGO_SETTINGS_MODULE=config.settings.local +ENV DJANGO_SETTINGS_MODULE=config.settings.production ENV DJANGO_READ_DOT_ENV_FILE=True -ENV DEBUG=True +ENV DEBUG=False RUN uv sync --frozen --no-dev && uv run manage.py collectstatic --noinput diff --git a/config/settings/production.py b/config/settings/production.py index b2c90b9..bac2fa5 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -9,7 +9,13 @@ from .base import env # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("DJANGO_SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["alphabetlearning.online"]) +# ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["alphabetlearning.online"]) +ALLOWED_HOSTS = [ + "alphabetlearning.online", + "www.alphabetlearning.online", + "staging.alphabetlearning.online", + "www.staging.alphabetlearning.online", +] # DATABASES # ------------------------------------------------------------------------------ diff --git a/docker-compose.yaml b/docker-compose.yaml index f17d14e..a1e0db8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,7 @@ services: web: - image: haircode/alphabetlearning:latest + # image: haircode/alphabetlearning:latest + build: . ports: - "8020:8020" volumes: |