Last active
March 24, 2018 13:53
-
-
Save caseydm/ea7b4400a274ae402a88e51f3b7e0dce to your computer and use it in GitHub Desktop.
Docker local development
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: '3' | |
services: | |
db: | |
image: postgres:9.6.3 | |
expose: | |
- "5432" | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
redis: | |
image: redis:3.2.6 | |
expose: | |
- "6379" | |
volumes: | |
- ./code | |
redis_cache: | |
image: redis:3.2.6 | |
expose: | |
- "6379" | |
elasticsearch: | |
image: elasticsearch:5.6.6 | |
expose: | |
- "9200" | |
web: | |
build: . | |
command: python manage.py runserver 0.0.0.0:8000 | |
ports: | |
- "8000:8000" | |
environment: | |
- DATABASE_URL=postgresql://postgres@db/postgres | |
- ENVIRONMENT=development | |
- REDIS_URL=redis://redis:6379 | |
- REDIS_CACHE_URL=redis://redis_cache:6379 | |
- ELASTIC_ENDPOINT=elasticsearch:9200 | |
env_file: docker.env | |
depends_on: | |
- db | |
- redis | |
- elasticsearch | |
volumes: | |
- .:/code | |
volumes: | |
pgdata: {} |
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:2.7.14 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /code | |
WORKDIR /code | |
ADD . /code/ | |
ADD requirements /requirements | |
RUN pip install -r /requirements/local.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment