Add a Docker environment

This commit is contained in:
Ian Adam Naval 2019-01-21 23:52:26 -05:00
parent 9e43cee86c
commit 3aea6dd8e7
2 changed files with 32 additions and 0 deletions

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM python:3.7.2
EXPOSE 5000
VOLUME /app
RUN pip install pipenv
WORKDIR /app
ADD Pipfile .
ADD Pipfile.lock .
RUN pipenv install --system --deploy --ignore-pipfile --verbose
ENV AUTOPILOT_USERNAME ""
ENV AUTOPILOT_PASSWORD ""
ENV AUTOPILOT_USER_ID -1
ADD ./autopilot /app/autopilot
CMD ["uwsgi", "--http", "0.0.0.0:5000", \
"--protocol", "uwsgi", \
"--wsgi", "autopilot.app:app"]

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
default: run
run: build
docker run -v $(CURDIR):/app -p "5000:5000" --env-file=.env ianonavy/autopilot
build: Dockerfile
docker build -t ianonavy/autopilot .
release:
docker push ianonavy/autopilot:latest