aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile6
-rw-r--r--config/settings/production.py8
-rw-r--r--docker-compose.yaml3
3 files changed, 12 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index a07ae5c..a2ab775 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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: