Skip to content

Commit

Permalink
Use exec instead of run in Docker init steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz committed Nov 26, 2017
1 parent 823b2e7 commit 57c606a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,17 @@ containers - one for the database and one for the application.
cp docker.env.example docker.env
editor docker.env
1. Build the web container
1. Build/run the application

docker-compose build
docker-compose up -d
1. Initialize the database (this will also build the db container)
1. Initialize the database *(first run/after updates)*

docker-compose run --rm web python manage.py migrate
docker-compose exec app python manage.py migrate

1. Initialize static assets
1. Initialize static assets *(first run/after updates)*

docker-compose run --rm web python manage.py collectstatic
1. Launch! :rocket:

docker-composer up
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
Expand All @@ -121,7 +117,7 @@ for detailed information about Nanobox's deployment and configuration process.

cd babybuddy

1. Add the `SECREY_KEY` and `DJANGO_SETTINGS_MODULE` environment variables
1. Add the `SECRET_KEY` and `DJANGO_SETTINGS_MODULE` environment variables

nanobox evar add DJANGO_SETTINGS_MODULE=babybuddy.settings.nanobox
nanobox evar add SECRET_KEY=<CHANGE TO SOMETHING RANDOM>
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "2"
services:
db:
image: postgres
web:
app:
env_file: docker.env
build: .
command: gunicorn -c /app/gunicorn.py babybuddy.wsgi
Expand Down

0 comments on commit 57c606a

Please sign in to comment.