Created
October 9, 2019 08:13
-
-
Save mstfsnc/3b110befab1ca585d2789d10332aadfa to your computer and use it in GitHub Desktop.
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.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: |
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-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