Created
April 29, 2019 14:14
-
-
Save jrmmendes/dc9e579503dcd0c3bc2a6812f64c8509 to your computer and use it in GitHub Desktop.
Deploy básico para Heroku
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
# Pegar como camada base o sistema que roda na heroku | |
FROM heroku/heroku:16-build | |
# Adicionar metadados | |
LABEL maintainer="[email protected]" | |
ENV PYTHONUNBUFFERED 1 | |
# Copiar requirements para o container e instalar | |
COPY requirements.txt /tmp/requirements.txt | |
RUN apt-get update | |
RUN apt-get install python3-pip -y | |
WORKDIR /src/ | |
RUN pip3 install -r /tmp/requirements.txt | |
# Copiar aplicação para dentro do container | |
COPY . . | |
# Executar aplicação | |
RUN python3 manage.py migrate | |
CMD python3 manage.py runserver 0.0.0.0:$PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment