From 6ff310f15ef3d7ad38563d227f28e07676a7ff23 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Thu, 23 Nov 2017 22:23:52 -0500 Subject: [PATCH] Add Dockerfile (WIP). --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..1799be58 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM node:8 as build +WORKDIR /build +ADD package.json /build/ +ADD package-lock.json /build/ +RUN npm install +RUN npm install -g gulp-cli +ADD gulpfile.js /build/gulpfile.js +ADD api /app/api +ADD babybuddy /app/babybuddy +ADD core /app/core +ADD dashboard /app/dashboard +ADD reports /app/reports +RUN gulp build + + +FROM python:3 as app +ENV PYTHONUNBUFFERED 1 +RUN pip install --upgrade pipenv gunicorn +WORKDIR /app +COPY Pipfile /app/ +COPY Pipfile.lock /app/ +RUN pipenv install --deploy --system +ADD manage.py /app/ +ADD api /app/api +ADD babybuddy /app/babybuddy +ADD core /app/core +ADD dashboard /app/dashboard +ADD reports /app/reports +ENV DJANGO_SETTINGS_MODULE babybuddy.settings.development +COPY --from=build /build/babybuddy/static /app/babybuddy/static +RUN python manage.py collectstatic --no-input +RUN python manage.py migrate +ADD etc/gunicorn.py /app/ +EXPOSE 8000 +ENTRYPOINT gunicorn -c /app/gunicorn.py babybuddy.wsgi