diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..81dd04e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2cfbe60 --- /dev/null +++ b/Makefile @@ -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