Skip to content

Commit

Permalink
Small docker fixes
Browse files Browse the repository at this point in the history
Add a `demodata` target to the docker entrypoint script, and update the
documenation to use the entrypoint arguments.
  • Loading branch information
ConsoleCatzirl committed Feb 13, 2022
1 parent 7334440 commit 8bd9aef
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ COPY contrib/common/apt/ralph.list \
docker/provision/docker-entrypoint.sh \
docker/provision/createsuperuser.py \
docker/provision/start-ralph.sh \
docker/provision/demo-ralph.sh \
docker/provision/wait-for-it.sh \
docker/provision/install_ralph.sh \
build/*$RALPH_VERSION*.deb \
Expand Down
4 changes: 4 additions & 0 deletions docker/provision/demo-ralph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash
set -eu

ralph demodata
5 changes: 4 additions & 1 deletion docker/provision/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ case "$ARG" in
upgrade)
"${RALPH_LOCAL_DIR}/init-ralph.sh" upgrade
;;
demodata)
"${RALPH_LOCAL_DIR}/demo-ralph.sh"
;;
*)
echo "Usage: ${0} {start|init|upgrade}"
echo "Usage: ${0} {start|init|upgrade|demodata}"
exit 1
esac
1 change: 1 addition & 0 deletions docker/provision/install_ralph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ move_scripts() {
start-ralph.sh \
wait-for-it.sh \
init-ralph.sh \
demo-ralph.sh \
"

for f in $files_to_move; do
Expand Down
6 changes: 3 additions & 3 deletions docs/installation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ Then build ralph:

To initialize database run:

docker-compose run --rm web /root/init.sh
docker-compose run --rm web init

Notice that this command should be executed only once, at the very beginning.

If you need to populate Ralph with some demonstration data run:

docker-compose run --rm web ralph demodata
docker-compose run --rm web demodata

### Run

Expand All @@ -200,7 +200,7 @@ Ralph should be accessible at ``http://127.0.0.1`` (or if you are using ``boot2d

If you are upgrading ralph image (source code) run:

docker-compose run --rm web /root/upgrade.sh
docker-compose run --rm web upgrade


# Migration from Ralph 2
Expand Down

0 comments on commit 8bd9aef

Please sign in to comment.