diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2450bd1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3 +ENV PYTHONUNBUFFERED 1 +RUN mkdir /code +WORKDIR /code +COPY . /code/ +RUN pip install -r requirements.txt +COPY docker_local.py /code/care/settings/local.py \ No newline at end of file diff --git a/README.md b/README.md index 9e5dc24..aa5fcb5 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,7 @@ Important vars to edit during a new deploy are: TWILIO_PHONE_NUMBERS = [] TWILIO_ACCOUNT_SID = TWILIO_AUTH_TOKEN = - REDCAP_TOKEN = { - 'en': '', - 'es': '', - } + This uses an old import trick so beware, it 'loads' itself into the `/settings/__init__.py` so that base/local/dotenv can be combined into one voltron setting module. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0bd0795 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' + +services: + db: + image: postgres + environment: + - POSTGRES_DB=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + volumes: + - ./postgres-data:/var/lib/postgresql/data + web: + build: . + command: python manage.py runserver 0.0.0.0:8000 + ports: + - "8000:8000" + depends_on: + - db \ No newline at end of file diff --git a/docker_local.py b/docker_local.py new file mode 100644 index 0000000..a5d291a --- /dev/null +++ b/docker_local.py @@ -0,0 +1,26 @@ +# setting.py + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'postgres', + 'USER': 'postgres', + 'PASSWORD': 'postgres', + 'HOST': 'db', + 'PORT': 5432, + } +} + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = ['localhost', ] + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'EDIT ME BEFORE PRODUCTION' +# Twilio Settings (UA D7 currently): +# currently we can't programatically add numbers to Notify/Messaging services, +# so that will need to be done manually in Twilio Console. +# TWILIO_PHONE_NUMBERS = [] +# TWILIO_ACCOUNT_SID = +# TWILIO_AUTH_TOKEN = \ No newline at end of file