-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get things kind of working with Docker
- Loading branch information
1 parent
35258ca
commit ce6c423
Showing
7 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ settings_secret.py | |
static/img | ||
*.swp | ||
lib | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM python:3.8 | ||
|
||
WORKDIR /app | ||
ENV DJANGO_SETTINGS_MODULE=QI.settings_docker | ||
|
||
COPY requirements.txt /app/requirements.txt | ||
|
||
RUN pip install -r /app/requirements.txt | ||
|
||
COPY . /app | ||
|
||
EXPOSE 8000 | ||
ENV PORT=8000 | ||
|
||
CMD gunicorn --reload --bind 0.0.0.0:${PORT:-8000} QI.wsgi:application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import os | ||
|
||
from .settings import * | ||
|
||
DEBUG = os.environ.get('DEBUG', '').lower() in ['true', '1'] | ||
|
||
ALLOWED_HOSTS = ['*'] | ||
|
||
SECRET_KEY = os.environ.get('SECRET_KEY') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: "3.9" | ||
|
||
services: | ||
web: | ||
build: . | ||
volumes: | ||
- .:/app | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
- SECRET_KEY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters