Created
September 3, 2018 12:35
-
-
Save xelawafs/165546b776306397a2ad9e9626238d04 to your computer and use it in GitHub Desktop.
django-docker-template
This file contains hidden or 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: '2' | |
services: | |
db: | |
image: mysql:5.7.23 | |
ports: | |
- 9906:3306 | |
environment: | |
MYSQL_ROOT_PASSWORD: root_password | |
MYSQL_USER: user | |
MYSQL_PASSWORD: password | |
MYSQL_DATABASE: database | |
web: | |
build: . | |
command: python manage.py makemigrations | |
command: python manage.py migrate | |
command: python manage.py runserver 0.0.0.0:8008 | |
volumes: | |
- .:/app/data_store | |
ports: | |
- "8008:8008" | |
depends_on: | |
- db | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
environment: | |
- PMA_ARBITRARY=1 | |
restart: always | |
ports: | |
- 8082:80 | |
volumes: | |
- /sessions |
This file contains hidden or 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.6 | |
ENV PYTHONUNBUFFERED 1 | |
# Install Python and Package Libraries | |
RUN apt-get update && apt-get upgrade -y && apt-get autoremove && apt-get autoclean | |
RUN apt-get install -y \ | |
apache2-dev \ | |
libffi-dev \ | |
libssl-dev \ | |
default-libmysqlclient-dev \ | |
libxml2-dev \ | |
libxslt-dev \ | |
libjpeg-dev \ | |
libfreetype6-dev \ | |
zlib1g-dev \ | |
net-tools \ | |
nano | |
RUN pip install mod_wsgi | |
# Project Files and Settings | |
ARG PROJECT=project_name | |
ARG PROJECT_DIR=/app/${PROJECT} | |
RUN mkdir -p $PROJECT_DIR | |
WORKDIR $PROJECT_DIR | |
COPY . . | |
RUN pip install -r requirements.txt |
This file contains hidden or 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.0.2 | |
django-filter==2.0.0.dev1 | |
djangorestframework==3.7.7 | |
Markdown==2.6.11 | |
mysqlclient==1.3.12 | |
pytz==2018.3 | |
djoser==1.1.5 | |
requests | |
mod_wsgi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment