mirror of https://github.com/snachodog/mybuddy.git
Update Docker deployment config.
This commit is contained in:
parent
5e728767cf
commit
69fcfd65b9
18
Dockerfile
18
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/
|
||||
|
|
10
README.md
10
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/)
|
||||
|
|
Loading…
Reference in New Issue