From 69fcfd65b93d430811250937b9df3262e4caebb8 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Sun, 4 Nov 2018 08:37:33 -0800 Subject: [PATCH] Update Docker deployment config. --- Dockerfile | 18 +----------------- README.md | 10 ++-------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1df371c..c2904de9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,3 @@ -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 gulpfile.config.js /build/gulpfile.config.js -ADD api /build/api -ADD babybuddy /build/babybuddy -ADD core /build/core -ADD dashboard /build/dashboard -ADD reports /build/reports -RUN gulp build - - FROM python:3 as app ENV PYTHONUNBUFFERED 1 RUN pip install --upgrade pipenv gunicorn @@ -27,5 +11,5 @@ ADD babybuddy /app/babybuddy ADD core /app/core ADD dashboard /app/dashboard ADD reports /app/reports -COPY --from=build /build/babybuddy/static /app/babybuddy/static +ADD static /app/static ADD etc/gunicorn.py /app/ diff --git a/README.md b/README.md index a485a8f7..210f19dc 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,9 @@ redeploy the app (e.g. if there are errors or settings are changed). ### Docker -A Docker deploy requires [Docker](http://docker.com/) and +A Docker deployment requires [Docker](http://docker.com/) and [Docker Compose](https://docs.docker.com/compose/overview/) to create two -containers - one for the database and one for the application. Baby Buddy uses a -[multi-stage build](https://docs.docker.com/engine/userguide/eng-image/multistage-build/), -which requires Docker version 17.05 or newer. +containers - one for the database and one for the application. 1. Copy the `docker.env.example` to `docker.env` and set the `ALLOWED_HOSTS` and `SECRET_KEY` variables within @@ -106,10 +104,6 @@ which requires Docker version 17.05 or newer. docker-compose exec app python manage.py migrate -1. Initialize static assets *(first run/after updates)* - - docker-compose exec app python manage.py collectstatic - The app should now be locally available at [http://127.0.0.1:8000](http://127.0.0.1:8000). See [Get Started, Part 6: Deploy your app](https://docs.docker.com/get-started/part6/)