-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplate.rb
More file actions
30 lines (25 loc) · 765 Bytes
/
template.rb
File metadata and controls
30 lines (25 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require "open-uri"
base_uri = "https://raw.githubusercontent.com/Ruby-Starter-Kits/Docker-Rails-Generator/master/App-Template/"
files = [
".github/workflows/tests.yml",
"bin/docker/entrypoints/wait-for-postgres.sh",
"bin/docker/entrypoints/wait-for-web.sh",
"bin/docker/prepare-to-start-rails",
"config/cable.yml",
"config/database.yml",
".dockerignore",
"docker-compose.ci.yml",
"docker-compose.yml",
"Dockerfile"
]
files.each do |file_path|
file file_path, URI.parse("#{base_uri}#{file_path}").open.read
end
if yes?("Build Docker Environment?")
run("docker-compose build && docker-compose run --rm web bin/setup")
if yes?("Start Your Ruby on Rails App?")
run("docker-compose up")
else
run("docker-compose down")
end
end