From 7caaee27f74a05ceab9a9e195aeab817cf3fa4bc Mon Sep 17 00:00:00 2001 From: Hannes Alarotu Date: Fri, 18 Jan 2019 15:47:04 +0200 Subject: [PATCH 1/2] Dockerfile changes --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8f05cf8..466c2359 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,14 @@ FROM python:3.6 WORKDIR /usr/src/app -ENV APP_NAME respa +ENV ALLOWED_HOSTS [0.0.0.0] RUN apt-get update && apt-get install -y libgdal20 libpq-dev COPY requirements.txt . -COPY deploy/requirements.txt ./deploy/requirements.txt -RUN pip install --no-cache-dir -r deploy/requirements.txt +RUN pip install --no-cache-dir -r requirements.txt COPY . . -CMD ["deploy/server.sh"] +CMD ["python", "-u", "manage.py", "runserver", "0.0.0.0:8000"] From 41f1bcf13311120eea629c76fd450560a8d915d7 Mon Sep 17 00:00:00 2001 From: Hannes Alarotu Date: Tue, 22 Jan 2019 15:44:47 +0200 Subject: [PATCH 2/2] dockerization fixed --- Dockerfile | 2 +- local_settings.py.example | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 local_settings.py.example diff --git a/Dockerfile b/Dockerfile index 466c2359..5585c899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.6 WORKDIR /usr/src/app -ENV ALLOWED_HOSTS [0.0.0.0] +ENV DEBUG True RUN apt-get update && apt-get install -y libgdal20 libpq-dev diff --git a/local_settings.py.example b/local_settings.py.example new file mode 100644 index 00000000..bd4b4103 --- /dev/null +++ b/local_settings.py.example @@ -0,0 +1,12 @@ +DATABASES = { + 'default': { + 'ENGINE': 'django.contrib.gis.db.backends.postgis', + 'HOST': 'kerrokantasi-psql', + 'PORT': 5432, + 'NAME': 'kerrokantasi', + 'USER': 'kerrokantasi', + 'PASSWORD': 'kerrokantasi', + } +} + +ALLOWED_HOSTS=['localhost', '127.0.0.1'] \ No newline at end of file