Skip to content

Commit

Permalink
post_build: add migrate and load fixtures command
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Feb 16, 2021
1 parent 62326db commit 06f9410
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ Installation (Docker compose)
# default container user 'test' ID=1000, GID=1000
$ docker-compose build --build-arg USER_ID=$(id -u ${USER}) --build-arg GROUP_ID=$(id -g ${USER})
$ docker-compose up
$ docker exec -it --user test prahounakole_web_1 sh -c "/app-v/post_build.sh && pipenv run python manage.py migrate"
$ docker exec -it --user test prahounakole_web_1 sh -c "/app-v/post_build.sh"

Check prahounakole web app on the host web browser with URL http://localhost:8033/
2 changes: 2 additions & 0 deletions post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ pipenv run python manage.py collectmedia --noinput
cd bower_components/ol2/build/ && pipenv run python build.py -c none ../../../apps/cyklomapa/static/openstreetmap-pnk ../../../apps/cyklomapa/static/js/OpenLayers.PNK.js
cd /app-v
pipenv run python manage.py compress --force
pipenv run python manage.py migrate
pipenv run python manage.py loaddata apps/cyklomapa/fixtures/*

0 comments on commit 06f9410

Please sign in to comment.