Last active
October 30, 2019 12:59
-
-
Save a4amaan/a215ed42d40497023a6991ad3e1b2523 to your computer and use it in GitHub Desktop.
Docker Setup Files for Django Project
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
ports: | |
- "8000:8000" | |
volumes: | |
- .:/schoex | |
command: > | |
sh -c "python manage.py runserver 0.0.0.0:8000" |
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
FROM python:3.7-alpine | |
MAINTAINER London App Developer Ltd. | |
ENV PYTHONUNBUFFERED 1 | |
# Install dependencies | |
COPY requirements.txt ./ | |
RUN pip install -r requirements.txt | |
# Setup directory structure | |
RUN mkdir /schoex | |
WORKDIR /schoex | |
COPY . . | |
RUN adduser -D user | |
USER user |
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
Django>=2.1.0,<2.2.0 | |
djangorestframework>=3.8.2,<3.9.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment