diff --git a/.dockerignore b/.dockerignore index d2c3760..d180dd2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,7 +13,7 @@ # Ignore all environment files. /.env* !/.env*.erb -!/.env*.example +!/.env*.sample # Ignore all default key files. /config/master.key diff --git a/.gitignore b/.gitignore index 30862a1..97952d3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ # Ignore all environment files. /.env* !/.env*.erb -!/.env*.example +!/.env*.sample # Ignore all logfiles and tempfiles. /log/* @@ -38,7 +38,7 @@ /config/credentials/*.yml.enc # Ignore all config files -/config/cable.yml /config/database.yml -/config/solid_cache.yml -/config/solid_queue.yml +/config/cable.yml +/config/cache.yml +/config/queue.yml diff --git a/bin/setup b/bin/setup index be3db3c..a74338a 100755 --- a/bin/setup +++ b/bin/setup @@ -15,10 +15,22 @@ FileUtils.chdir APP_ROOT do puts "== Installing dependencies ==" system("bundle check") || system!("bundle install") - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # FileUtils.cp "config/database.yml.sample", "config/database.yml" - # end + puts "\n== Copying sample files ==" + unless File.exist?("config/database.yml") + FileUtils.cp "config/database.yml.sample", "config/database.yml" + end + unless File.exist?("config/cable.yml") + FileUtils.cp "config/cable.yml.sample", "config/cable.yml" + end + unless File.exist?("config/queue.yml") + FileUtils.cp "config/queue.yml.sample", "config/queue.yml" + end + unless File.exist?("config/queue.yml") + FileUtils.cp "config/queue.yml.sample", "config/queue.yml" + end + + puts "\n== Generating credential files ==" + system! "EDITOR=cat bin/rails credentials:edit" puts "\n== Preparing database ==" system! "bin/rails db:prepare" diff --git a/config/cable.yml.example b/config/cable.yml.sample similarity index 100% rename from config/cable.yml.example rename to config/cable.yml.sample diff --git a/config/database.yml.example b/config/database.yml.sample similarity index 100% rename from config/database.yml.example rename to config/database.yml.sample diff --git a/config/queue.yml b/config/queue.yml.sample similarity index 100% rename from config/queue.yml rename to config/queue.yml.sample