Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ Important vars to edit during a new deploy are:
TWILIO_PHONE_NUMBERS = []
TWILIO_ACCOUNT_SID = <REPLACE THIS>
TWILIO_AUTH_TOKEN = <REPLACE THIS>
REDCAP_TOKEN = {
'en': '<TOKEN HERE>',
'es': '<TOKEN HERE>',
}



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.
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions docker_local.py
Original file line number Diff line number Diff line change
@@ -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 = <REPLACE THIS>
# TWILIO_AUTH_TOKEN = <REPLACE THIS>