init Create a Docker Image for the backend Setup #115
This commit is contained in:
parent
a5d620ec82
commit
f85b591397
|
@ -64,6 +64,10 @@ db.sqlite3-journal
|
||||||
instance/
|
instance/
|
||||||
.webassets-cache
|
.webassets-cache
|
||||||
|
|
||||||
|
# docker stuff:
|
||||||
|
data/
|
||||||
|
docker.env
|
||||||
|
|
||||||
# Scrapy stuff:
|
# Scrapy stuff:
|
||||||
.scrapy
|
.scrapy
|
||||||
|
|
||||||
|
@ -139,3 +143,4 @@ dmypy.json
|
||||||
/CDC_Backend/Storage/
|
/CDC_Backend/Storage/
|
||||||
.idea
|
.idea
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ SECRET_KEY = 'e_i2g3z!y4+p3dwm%k9k=zmsot@aya-0$mmetgxz4mp#8_oy#*'
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['cdc-iitdh.herokuapp.com/', 'localhost', '192.168.29.199']
|
ALLOWED_HOSTS = ['cdc-iitdh.herokuapp.com/', 'localhost', '192.168.29.199', '127.0.0.1']
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM python:3
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
WORKDIR /code
|
||||||
|
COPY requirements.txt /code/
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
COPY . /code/
|
|
@ -0,0 +1,22 @@
|
||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
volumes:
|
||||||
|
- ./data/db:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=postgres
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
command: python3 manage.py runserver 0.0.0.0:8000
|
||||||
|
volumes:
|
||||||
|
- .:/code
|
||||||
|
working_dir: /code/CDC_backend
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
env_file: docker.env
|
||||||
|
depends_on:
|
||||||
|
- db
|
|
@ -0,0 +1,11 @@
|
||||||
|
DEBUG=True
|
||||||
|
EMAIL=<EMAIL>
|
||||||
|
EMAIL_PASSWORD=<APP_SECRET>
|
||||||
|
SECRET_KEY=<OUR_SECRET_KEY>
|
||||||
|
EMAIL_VERIFICATION_SECRET_KEY=<OUR_SECRET_KEY>
|
||||||
|
DB_NAME=<DB_NAME>
|
||||||
|
DB_USER=<DB_USER>
|
||||||
|
DB_PASSWORD=<DB_PASSWORD>
|
||||||
|
DB_HOST=db
|
||||||
|
DB_PORT=5432
|
||||||
|
RECAPTCHA_SECRET_KEY=<RECAPTCHA_SECRET_KEY>
|
Loading…
Reference in New Issue