diff --git a/bin/docker-setup b/bin/docker-setup new file mode 100755 index 000000000..6ab8fabf1 --- /dev/null +++ b/bin/docker-setup @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +echo "== Building Docker image (this may take a while) ==" +docker-compose build + +echo "== Setting up database ==" +docker-compose run web rails db:setup db:migrate search:setup + +echo "== Starting app ==" +docker-compose up diff --git a/bin/docker_setup b/bin/docker_setup deleted file mode 100755 index 08c2a9f3e..000000000 --- a/bin/docker_setup +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env ruby - -require "fileutils" - -# path to your application root. -APP_ROOT = File.expand_path("..", __dir__) - -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") -end - -FileUtils.chdir APP_ROOT do - puts "== Building Docker image (this may take a while) ==" - system!("docker-compose build") - - puts "== Setting up database ==" - system!("docker-compose run web rails db:setup db:migrate search:setup") - - puts "== Starting app ==" - system!("docker-compose up") -end diff --git a/docs/installation/docker.md b/docs/installation/docker.md index a65c9b996..b3e495a16 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -59,7 +59,7 @@ _Docker compose will by default use postgres:9.6 as the database version, should you want to update that set the `POSTGRES_VERSION` variable in your environment and start the container again_ -1. Run `bin/docker_setup` +1. Run `bin/docker-setup` 2. That's it! Navigate to The script executes the following steps: