Skip to content

Instantly share code, notes, and snippets.

@mstfsnc
Created October 9, 2019 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstfsnc/3b110befab1ca585d2789d10332aadfa to your computer and use it in GitHub Desktop.
Save mstfsnc/3b110befab1ca585d2789d10332aadfa to your computer and use it in GitHub Desktop.
version: '3.7'
services:
database:
image: postgres:11.4-alpine
volumes:
- database:/var/lib/postgresql/data/
ports:
- 5433:5432
env_file:
- .env
web:
image: image:latest
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 80:8000
depends_on:
- database
entrypoint: /entrypoint.sh
env_file:
- .env
links:
- database
volumes:
database:
FROM python:3.7-slim
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /code
RUN pip install --upgrade pip && pip install pipenv
COPY Pipfile Pipfile.lock /code/
RUN pipenv install --system
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment