roro 0.3.28 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +24 -8
- data/.idea/.gitignore +8 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/roro.iml +116 -0
- data/.idea/vcs.xml +6 -0
- data/CODE_OF_CONDUCT.md +31 -77
- data/lib/roro/cli/generate/generate_containers.rb +0 -5
- data/lib/roro/cli.rb +8 -8
- data/lib/roro/configurators/adventure_chooser.rb +1 -0
- data/lib/roro/configurators/adventure_picker.rb +1 -0
- data/lib/roro/configurators/adventure_writer.rb +4 -1
- data/lib/roro/configurators/configurator.rb +15 -8
- data/lib/roro/configurators/dependency_satisfier.rb +136 -0
- data/lib/roro/configurators/question_asker.rb +3 -3
- data/lib/roro/configurators/structure_builder.rb +2 -0
- data/lib/roro/configurators/validator.rb +2 -0
- data/lib/roro/dependencies/base.yml +90 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/_django.yml +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml +2 -8
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/stage_one_test.rb +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/%interpolated_story_name%.yml.tt → languages/python/python.yml} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/templates/stage_one/%interpolated_stack_path% → languages/python}/templates/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/templates/stage_one/%interpolated_stack_path% → languages/python}/test/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/templates/stage_one/%interpolated_stack_path% → languages/python}/test/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/templates/stage_one/%interpolated_stack_path% → languages/python}/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/python/test/stage_one/stage_test.rb +42 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/ruby.yml +10 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/rails.yml +36 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/{stories/roll_your_own/test/stage_one/dummy → languages/ruby/stories/rails/templates/stage_one}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/templates/stage_one/Dockerfile.tt +26 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/6_1.yml +44 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/.env +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/Dockerfile.tt +28 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/config/database.yml +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/config/initializers/sidekiq.rb +13 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/docker-compose.yml.tt +57 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/{sashimi/stories/django/test/stage_one/dummy → okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/entrypoints}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/entrypoints/docker-entrypoint.sh +9 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/templates/stage_one/entrypoints/sidekiq-entrypoint.sh +9 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/{sashimi/stories/django/test/stage_two/dummy → okonomi/languages/ruby/stories/rails/versions/6_1/test}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/{sashimi/stories/rails/templates/stage_one/Gemfile.lock.tt → okonomi/languages/ruby/stories/rails/versions/6_1/test/stage_one/.keep} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/test/stage_one/stage_dummy/Gemfile +66 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/6_1/test/stage_one/stage_test.rb +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/7_0.yml +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/.env +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/Dockerfile.tt +28 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/config/database.yml +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/config/initializers/sidekiq.rb +13 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/docker-compose.yml.tt +57 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/entrypoints/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/entrypoints/docker-entrypoint.sh +9 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/templates/stage_one/entrypoints/sidekiq-entrypoint.sh +9 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/test/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/test/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/test/stage_one/stage_dummy/Gemfile +66 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/languages/ruby/stories/rails/versions/7_0/test/stage_one/stage_test.rb +37 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/okonomi.yml +4 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/templates/stage_one/.dockerignore +18 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/.env +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb +2 -10
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/sashimi.yml +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/cert-manager.yml +32 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/echo1.yaml +32 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/echo2.yaml +32 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/echo_ingress.yaml.tt +18 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/prod_issuer.yaml.tt +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_1/staging_issuer.yaml.tt +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_2/echo_ingress.yaml.tt +25 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_3/echo_ingress.yaml.tt +25 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/templates/stage_3/ingress_nginx_svc.yaml.tt +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/test/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/test/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/kubernetes/stories/ingress/stories/nginx/stories/cert-manager/test/stage_one/stage_test.rb +32 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/rails.yml +48 -9
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/.env +4 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/.gitignore +55 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/docker-compose.yml.tt +36 -12
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/app-deployment.yaml.tt +72 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/app-service.yaml.tt +20 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/database-deployment.yaml.tt +59 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/database-service.yaml.tt +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/db-data-persistentvolumeclaim.yaml.tt +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/env-configmap.yaml.tt +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/redis-deployment.yaml.tt +33 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/redis-service.yaml.tt +19 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/secret.yaml.tt +11 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/k8s/sidekiq-deployment.yaml.tt +56 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/test/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/test/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/test/stage_one/stage_test.rb +33 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/{okonomi → sashimi}/stories/roll_your_own/roll_your_own.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/%interpolated_story_name%.yml.tt +10 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/templates/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_test.rb.tt +41 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/templates/stage_one/.gitignore.tt +55 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roll_your_own/test/stage_one/dummy/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/{okonomi → sashimi}/stories/roll_your_own/test/stage_one/stage_one_test.rb +2 -1
- data/lib/roro/version.rb +1 -1
- data/lib/roro.rb +4 -10
- data/mise/containers/backend/env/.keep +0 -0
- data/mise/containers/backend/scripts/.keep +0 -0
- data/mise/containers/database/env/.keep +0 -0
- data/mise/containers/database/scripts/.keep +0 -0
- data/mise/containers/frontend/env/.keep +0 -0
- data/mise/containers/frontend/scripts/.keep +0 -0
- data/mise/scripts/.keep +0 -0
- data/roro.gemspec +3 -3
- metadata +115 -72
- data/.ruby-version +0 -1
- data/lib/roro/cli/roll_your_own.rb +0 -12
- data/lib/roro/configurator.rb +0 -15
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_test.rb.tt +0 -37
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml +0 -36
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt +0 -7
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt +0 -20
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/requirements.txt.tt +0 -2
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_two/settings.py +0 -130
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/stage_one_test.rb +0 -37
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/expressjs.yml +0 -7
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/Dockerfile.tt +0 -14
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/docker-compose.yml.tt +0 -21
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Dockerfile.tt +0 -16
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.tt +0 -2
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/entrypoint.sh +0 -8
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_two/database.yml.tt +0 -16
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/__MACOSX/scripts/._.DS_Store +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/.DS_Store +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/bundler.sh +0 -22
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/git.sh +0 -21
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/rvm.sh +0 -38
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/utilities.sh +0 -53
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base.sh +0 -6
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_idea.sh +0 -14
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_repos.sh +0 -33
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_correct_bundler.sh +0 -21
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_rubies.sh +0 -6
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize.sh +0 -18
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/roro.sh +0 -15
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/source.sh +0 -28
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/bundle_all.sh +0 -12
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/git_pull_all.sh +0 -15
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/rvm_install_all.sh +0 -12
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/yarn_install_all.sh +0 -10
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/templates/stage_one/docker-compose.yml.tt +0 -31
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/wordpress.yml +0 -16
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'os'
|
|
4
|
+
|
|
5
|
+
module Roro
|
|
6
|
+
module Configurators
|
|
7
|
+
class DependencySatisfier < Thor
|
|
8
|
+
include Thor::Actions
|
|
9
|
+
include Utilities
|
|
10
|
+
|
|
11
|
+
attr_reader :dependencies, :checks, :dependencies, :manifest, :builder, :env
|
|
12
|
+
|
|
13
|
+
no_commands do
|
|
14
|
+
|
|
15
|
+
def satisfy_dependencies(manifest = [])
|
|
16
|
+
@manifest = manifest
|
|
17
|
+
@builder = {
|
|
18
|
+
actions: [],
|
|
19
|
+
env: {}
|
|
20
|
+
}
|
|
21
|
+
@dependencies = {}.tap do |d|
|
|
22
|
+
d.merge!(gather_base_dependencies)
|
|
23
|
+
d.merge!(gather_stack_dependencies)
|
|
24
|
+
end
|
|
25
|
+
gather_checks
|
|
26
|
+
checks.each { |c| validate_check(c) }
|
|
27
|
+
checks.each { |c| satisfy(c) }
|
|
28
|
+
install_dependencies
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def install_dependencies
|
|
33
|
+
actions = @builder[:actions]
|
|
34
|
+
actions.each do |a|
|
|
35
|
+
eval a
|
|
36
|
+
end
|
|
37
|
+
@env = @builder[:env] || {}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def gather_base_dependencies(stack = Roro::CLI.dependency_root)
|
|
41
|
+
{}.tap do |b|
|
|
42
|
+
children(stack).each { |c| b.merge!(read_yaml(c)) }
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def gather_stack_dependencies
|
|
47
|
+
{}.tap do |b|
|
|
48
|
+
manifest.each { |c| b.merge!(read_yaml(c)[:dependencies] || {}) }
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def gather_checks
|
|
53
|
+
@checks = []
|
|
54
|
+
manifest.each do |f|
|
|
55
|
+
read_yaml(f).dig(:depends_on)&.each do |c|
|
|
56
|
+
@checks << c
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
@checks
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def validate_check(check)
|
|
63
|
+
msg = "No #{check} dependency exists. Please define it before depending on it."
|
|
64
|
+
dependencies[check.to_sym] || raise(Roro::Error, msg)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def satisfy(check)
|
|
68
|
+
d = dependencies[check.to_sym]
|
|
69
|
+
return if dependency_met?(check)
|
|
70
|
+
help = hint(d, :help)
|
|
71
|
+
lucky = hint(d, :lucky)
|
|
72
|
+
msg = ["\n\n#{set_color("Missing Dependency", :yellow)}: #{check}"]
|
|
73
|
+
if lucky
|
|
74
|
+
msg << " #{set_color("Platform", :yellow)}: #{platform}"
|
|
75
|
+
msg << " #{set_color("Install with", :yellow)}: $ #{lucky.shift}"
|
|
76
|
+
lucky.each do |c|
|
|
77
|
+
msg << " $ #{c}"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
if help
|
|
81
|
+
msg << " Help: #{help}" if help
|
|
82
|
+
end
|
|
83
|
+
say(msg.join("\n\s\s"))
|
|
84
|
+
if lucky && yes?("Do you feel lucky?")
|
|
85
|
+
@builder ||= {
|
|
86
|
+
actions: [],
|
|
87
|
+
env: {}
|
|
88
|
+
}
|
|
89
|
+
@builder[:env].merge!(d.dig(:env) || {})
|
|
90
|
+
@builder[:actions] = @builder[:actions] + lucky
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def hint(hash, key)
|
|
97
|
+
hash
|
|
98
|
+
case
|
|
99
|
+
when OS.linux? && hash.dig(:overrides, platform_for(hash), key )
|
|
100
|
+
hash.dig(:overrides, platform_for(hash), key)
|
|
101
|
+
when hash.dig(:overrides, platform, key)
|
|
102
|
+
hash.dig(:overrides, platform, key)
|
|
103
|
+
when hash.dig(key)
|
|
104
|
+
hash.dig(key)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def dependency_met?(command)
|
|
109
|
+
system(command.to_s) ? true : false
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def platform_for(dependency)
|
|
113
|
+
overrides = dependency.dig(:overrides)
|
|
114
|
+
return if overrides.nil? || overrides.empty?
|
|
115
|
+
return platform if overrides.keys.include?(platform)
|
|
116
|
+
overrides.select do |key, value|
|
|
117
|
+
return key if value.dig(:aliases)&.include?(platform.to_s)
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def platform
|
|
122
|
+
case
|
|
123
|
+
when OS.linux?
|
|
124
|
+
distro
|
|
125
|
+
else
|
|
126
|
+
OS.host_os.to_sym
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def distro
|
|
131
|
+
OS.parse_os_release[:ID].to_sym
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
@@ -13,16 +13,16 @@ module Roro
|
|
|
13
13
|
answer.size > 1 ? answer : override_default(question)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def confirm_default(question,
|
|
16
|
+
def confirm_default(question, hash)
|
|
17
17
|
options = { "y": "yes", "n": "no", 'a': 'accept all defaults'}
|
|
18
18
|
humanized_options = options.map {|key, value|
|
|
19
19
|
"(#{key}) #{value}"
|
|
20
20
|
}
|
|
21
21
|
getsome = "Would you like to accept the default value?\n"
|
|
22
22
|
prompt = [question, getsome, humanized_options, "\n"].join("\n")
|
|
23
|
-
case ask(prompt)
|
|
23
|
+
case ask(prompt, path: hash[:path])
|
|
24
24
|
when 'y'
|
|
25
|
-
|
|
25
|
+
hash[:value]
|
|
26
26
|
when 'n'
|
|
27
27
|
override_default(question)
|
|
28
28
|
when 'a'
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
docker:
|
|
2
|
+
name: docker
|
|
3
|
+
command: dockerddd -v
|
|
4
|
+
verification_command: sudo docker run hello-world
|
|
5
|
+
help: https://docs.docker.com/get-docker/
|
|
6
|
+
overrides:
|
|
7
|
+
ubuntu:
|
|
8
|
+
help: https://docs.docker.com/engine/install/ubuntu/
|
|
9
|
+
lucky:
|
|
10
|
+
- sudo apt-get remove docker docker-engine docker.io containerd runc
|
|
11
|
+
- sudo apt-get update
|
|
12
|
+
- sudo apt-get install \
|
|
13
|
+
ca-certificates \
|
|
14
|
+
curl \
|
|
15
|
+
gnupg \
|
|
16
|
+
lsb-release
|
|
17
|
+
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
18
|
+
- echo \
|
|
19
|
+
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
|
20
|
+
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
21
|
+
- sudo apt-get update
|
|
22
|
+
- sudo apt-get install docker-ce docker-ce-cli containerd.io
|
|
23
|
+
- sudo groupadd docker
|
|
24
|
+
- sudo usermod -aG docker $USER
|
|
25
|
+
- newgrp docker
|
|
26
|
+
- sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
|
|
27
|
+
- sudo chmod g+rwx "$HOME/.docker" -R
|
|
28
|
+
debian:
|
|
29
|
+
help: https://docs.docker.com/engine/install/debian/
|
|
30
|
+
lucky:
|
|
31
|
+
- sudo apt-get remove docker docker-engine docker.io containerd runc
|
|
32
|
+
- sudo apt-get update
|
|
33
|
+
- sudo apt-get install \
|
|
34
|
+
ca-certificates \
|
|
35
|
+
curl \
|
|
36
|
+
gnupg \
|
|
37
|
+
lsb-release
|
|
38
|
+
- curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
39
|
+
- echo \
|
|
40
|
+
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
|
|
41
|
+
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
42
|
+
- sudo apt-get update
|
|
43
|
+
- sudo apt-get install docker-ce docker-ce-cli containerd.io
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
git:
|
|
47
|
+
name: git
|
|
48
|
+
command: git version
|
|
49
|
+
help: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
|
|
50
|
+
env:
|
|
51
|
+
base:
|
|
52
|
+
git_config_user_name:
|
|
53
|
+
name: The name you'd like associated with git activities
|
|
54
|
+
value: Jane Doe
|
|
55
|
+
git_config_user_email:
|
|
56
|
+
name: The email address you'd like associated with git activities
|
|
57
|
+
value: jane.doe@example.com
|
|
58
|
+
overrides:
|
|
59
|
+
linux:
|
|
60
|
+
lucky:
|
|
61
|
+
- some linux command
|
|
62
|
+
fedora:
|
|
63
|
+
aliases:
|
|
64
|
+
- rhel
|
|
65
|
+
- centos
|
|
66
|
+
lucky:
|
|
67
|
+
- sudo dnf install git-all
|
|
68
|
+
debian:
|
|
69
|
+
aliases:
|
|
70
|
+
- ubuntu
|
|
71
|
+
lucky:
|
|
72
|
+
- run "sudo apt install git-all"
|
|
73
|
+
- run "sudo apt-get install install-info"
|
|
74
|
+
- run "git config --global user.email jane.doe@example.com"
|
|
75
|
+
- run "git config --global user.name Jane Doe"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
doctl:
|
|
79
|
+
name: doctl
|
|
80
|
+
command: doctl version
|
|
81
|
+
help: https://docs.digitalocean.com/reference/doctl/how-to/install/
|
|
82
|
+
luck:
|
|
83
|
+
linux: cd ~ wget https://github.com/digitalocean/doctl/releases/download/v1.65.0/doctl-1.65.0-linux-amd64.tar.gz
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
kubectl:
|
|
87
|
+
name: kubectl
|
|
88
|
+
command: kubectl version
|
|
89
|
+
help: https://kubernetes.io/docs/tasks/tools/
|
|
90
|
+
hint: https://kubernetes.io/docs/tasks/tools/
|
data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/_django.yml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
actions:
|
|
2
|
+
- directory 'stage_one', '.', @env
|
|
3
|
+
- run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . &&
|
|
4
|
+
sudo chown -R $USER:$USER ."
|
|
5
|
+
- |
|
|
6
|
+
run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . &&
|
|
7
|
+
sudo chown -R $USER:$USER ."
|
data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml
CHANGED
|
@@ -6,7 +6,7 @@ env:
|
|
|
6
6
|
value: 3
|
|
7
7
|
help: https://www.python.org/doc/versions/
|
|
8
8
|
POSTGRES_DB:
|
|
9
|
-
name: Postgres
|
|
9
|
+
name: Postgres database name
|
|
10
10
|
value: postgres
|
|
11
11
|
help: https://www.postgresql.org/docs/9.0/manage-ag-createdb.html
|
|
12
12
|
POSTGRES_USER:
|
|
@@ -23,17 +23,11 @@ env:
|
|
|
23
23
|
help: https://www.forbes.com/sites/allbusiness/2016/10/23/12-tips-for-naming-your-startup-business/
|
|
24
24
|
|
|
25
25
|
actions:
|
|
26
|
-
- directory 'stage_one', '.', @env
|
|
27
|
-
- run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . &&
|
|
28
|
-
sudo chown -R $USER:$USER ."
|
|
29
|
-
- |
|
|
30
|
-
run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . &&
|
|
31
|
-
sudo chown -R $USER:$USER ."
|
|
32
26
|
- template 'stage_two/settings.py', "./#{@env[:base][:app_name][:value]}/settings.pycd cd", @env
|
|
33
27
|
- |
|
|
34
28
|
run "sudo chown -R $USER:$USER . &&
|
|
35
29
|
sudo docker-compose build &&
|
|
36
30
|
sudo docker-compose up -d --force-recreate"
|
|
37
|
-
- run "echo 'You may open your app at http://localhost:8000
|
|
31
|
+
- run "echo 'You may open your app at http://localhost:8000 '"
|
|
38
32
|
|
|
39
33
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
describe 'lib roro stacks catalog unstoppable developer_styles okonomi languages python' do
|
|
4
|
+
Given(:workbench) { 'empty' }
|
|
5
|
+
Given(:cli) { Roro::CLI.new }
|
|
6
|
+
Given(:adventures) { %w[] }
|
|
7
|
+
Given(:overrides) { %w[] }
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Given(:rollon) {
|
|
11
|
+
stub_adventure
|
|
12
|
+
stub_overrides
|
|
13
|
+
stub_run_actions
|
|
14
|
+
cli.rollon
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Given { rollon unless adventures.empty?}
|
|
18
|
+
|
|
19
|
+
describe 'must generate a' do
|
|
20
|
+
describe '.keep file so Git keeps the directory under source control' do
|
|
21
|
+
# Then { assert_file '.keep' }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
describe 'a file in the adjacent templates directory' do
|
|
25
|
+
# Then { assert_file 'path_to_expected_file' }
|
|
26
|
+
|
|
27
|
+
describe 'with expected content matching regex' do
|
|
28
|
+
# Then { assert_file 'path_to_expected_file', /expected_content' }
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe 'with expected content the same as actual content string' do
|
|
32
|
+
# Then { assert_file 'path_to_expected_file', 'expected_content' }
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe 'with many strings expected to have been interpolated' do
|
|
36
|
+
|
|
37
|
+
# Given(:strings) { [1, :second, third] }
|
|
38
|
+
# Then { strings.each { |c| assert_file 'path_to_expected_file', c }
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
preface: A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
|
|
2
|
+
|
|
3
|
+
env:
|
|
4
|
+
base:
|
|
5
|
+
ruby_version:
|
|
6
|
+
name: Ruby minor version
|
|
7
|
+
value: 3.0
|
|
8
|
+
bundler_version:
|
|
9
|
+
name: Bundler version
|
|
10
|
+
value: 2.2.28
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
preface: A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant
|
|
2
|
+
syntax that is natural to read and easy to write.
|
|
3
|
+
|
|
4
|
+
env:
|
|
5
|
+
base:
|
|
6
|
+
app_name:
|
|
7
|
+
name: Name for your app
|
|
8
|
+
value: unstoppable_app
|
|
9
|
+
DATABASE_NAME:
|
|
10
|
+
name: Database name
|
|
11
|
+
value: postgres
|
|
12
|
+
DATABASE_PASSWORD:
|
|
13
|
+
name: Database password
|
|
14
|
+
value: postgres
|
|
15
|
+
DATABASE_USERNAME:
|
|
16
|
+
name: Database username
|
|
17
|
+
value: postgres
|
|
18
|
+
DATABASE_HOST:
|
|
19
|
+
name: Database host
|
|
20
|
+
value: database
|
|
21
|
+
POSTGRES_NAME:
|
|
22
|
+
name: Database name
|
|
23
|
+
value: ${DATABASE_NAME}
|
|
24
|
+
POSTGRES_PASSWORD:
|
|
25
|
+
name: Database password
|
|
26
|
+
value: ${DATABASE_PASSWORD}
|
|
27
|
+
POSTGRES_USERNAME:
|
|
28
|
+
name: Database username
|
|
29
|
+
value: ${DATABASE_USERNAME}
|
|
30
|
+
POSTGRES_HOST:
|
|
31
|
+
name: Database host
|
|
32
|
+
value: ${DATABASE_HOST}
|
|
33
|
+
actions:
|
|
34
|
+
- directory 'stage_one', '.', @env
|
|
35
|
+
- run 'sudo DOCKER_BUILDKIT=1 docker build --file Dockerfile --output . .'
|
|
36
|
+
- run 'sudo chown -R $USER:$USER .'
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
FROM ruby:<%= @env[:base][:ruby_version][:value] %>-alpine AS builder
|
|
2
|
+
|
|
3
|
+
# Add only packages necessary to generate a new rails app
|
|
4
|
+
RUN apk add \
|
|
5
|
+
build-base \
|
|
6
|
+
git \
|
|
7
|
+
postgresql-dev
|
|
8
|
+
|
|
9
|
+
WORKDIR /app
|
|
10
|
+
|
|
11
|
+
## Create a Gemfile with just the Rails gem inside:
|
|
12
|
+
RUN echo -e "source 'https://rubygems.org'\ngem 'rails', '~> <%= @env[:base][:rails_version][:value] %>'" > Gemfile
|
|
13
|
+
RUN gem install bundler:<%= @env[:base][:bundler_version][:value] %>
|
|
14
|
+
RUN bundle config --local && \
|
|
15
|
+
bundle install -j4 --retry 3
|
|
16
|
+
|
|
17
|
+
## Use Rails to generate a new app. We'll configure it later.
|
|
18
|
+
RUN bundle exec rails new . \
|
|
19
|
+
--database=postgresql \
|
|
20
|
+
--skip-bundle \
|
|
21
|
+
--skip-webpack-install
|
|
22
|
+
|
|
23
|
+
FROM scratch AS export-stage
|
|
24
|
+
|
|
25
|
+
## Copy the generated files onto the host.
|
|
26
|
+
COPY --from=builder ./app/ .
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
preface: some string
|
|
2
|
+
|
|
3
|
+
env:
|
|
4
|
+
base:
|
|
5
|
+
ruby_version:
|
|
6
|
+
name: Ruby minor version
|
|
7
|
+
value: 2.7.4
|
|
8
|
+
git_config_user_name:
|
|
9
|
+
name: The name you'd like associated with git activities
|
|
10
|
+
value: Jane Doe
|
|
11
|
+
git_config_user_email:
|
|
12
|
+
name: The email address you'd like associated with git activities
|
|
13
|
+
value: jane.doe@example.com
|
|
14
|
+
rails_version:
|
|
15
|
+
name: Ruby on Rails minor version
|
|
16
|
+
value: 6.1
|
|
17
|
+
bundler_version:
|
|
18
|
+
name: Bundler version
|
|
19
|
+
value: 2.2.30
|
|
20
|
+
JOB_WORKER_URL:
|
|
21
|
+
name: Reids job worker url
|
|
22
|
+
value: redis://redis:6379/0
|
|
23
|
+
REDIS_URL:
|
|
24
|
+
name: Reids url
|
|
25
|
+
value: redis://redis:6379/0
|
|
26
|
+
|
|
27
|
+
actions:
|
|
28
|
+
- directory "stage_one", '.', @env
|
|
29
|
+
- |
|
|
30
|
+
generator = Roro::CLI.new
|
|
31
|
+
generator.generate_mise
|
|
32
|
+
generator.generate_containers 'app', 'database', 'redis', 'sidekiq'
|
|
33
|
+
generator.generate_environments @env
|
|
34
|
+
generator.generate_keys
|
|
35
|
+
- chmod 'entrypoints/docker-entrypoint.sh', 0755
|
|
36
|
+
- chmod 'entrypoints/sidekiq-entrypoint.sh', 0755
|
|
37
|
+
- insert_into_file 'Gemfile', "gem 'sidekiq', '~>6.0.0'", :before => "\ngroup :development, :test do"
|
|
38
|
+
- run "sudo docker-compose build"
|
|
39
|
+
- run "sudo docker-compose run app bin/rails webpacker:install"
|
|
40
|
+
- run "sudo docker-compose run app rake db:create"
|
|
41
|
+
- run "sudo docker-compose up"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
FROM ruby:<%= @env[:base][:ruby_version][:value] %>-alpine AS builder
|
|
2
|
+
|
|
3
|
+
RUN apk add \
|
|
4
|
+
build-base \
|
|
5
|
+
postgresql-dev
|
|
6
|
+
|
|
7
|
+
RUN apk add --update\
|
|
8
|
+
file \
|
|
9
|
+
git \
|
|
10
|
+
nodejs \
|
|
11
|
+
tzdata \
|
|
12
|
+
yarn
|
|
13
|
+
|
|
14
|
+
RUN gem install bundler:<%= @env[:base][:bundler_version][:value] %>
|
|
15
|
+
|
|
16
|
+
WORKDIR /app
|
|
17
|
+
|
|
18
|
+
## Install standard gems
|
|
19
|
+
COPY Gemfile Gemfile.lock ./
|
|
20
|
+
RUN bundle install -j4 --retry 3
|
|
21
|
+
|
|
22
|
+
RUN yarn install
|
|
23
|
+
|
|
24
|
+
COPY . ./
|
|
25
|
+
|
|
26
|
+
RUN bundle install
|
|
27
|
+
|
|
28
|
+
CMD ["./entrypoints/docker-entrypoint.sh"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
default: &default
|
|
2
|
+
adapter: postgresql
|
|
3
|
+
encoding: unicode
|
|
4
|
+
host: <%= ENV.fetch('DATABASE_HOST') %>
|
|
5
|
+
username: <%= ENV.fetch('POSTGRES_USERNAME') %>
|
|
6
|
+
password: <%= ENV.fetch('DATABASE_PASSWORD') %>
|
|
7
|
+
database: <%= ENV.fetch('DATABASE_NAME') %>
|
|
8
|
+
pool: 5
|
|
9
|
+
variables:
|
|
10
|
+
statement_timeout: 5000
|
|
11
|
+
|
|
12
|
+
development:
|
|
13
|
+
<<: *default
|
|
14
|
+
|
|
15
|
+
test:
|
|
16
|
+
<<: *default
|
|
17
|
+
|
|
18
|
+
production:
|
|
19
|
+
<<: *default
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Sidekiq.configure_server do |config|
|
|
2
|
+
config.redis = {
|
|
3
|
+
host: ENV['REDIS_HOST'],
|
|
4
|
+
port: ENV['REDIS_PORT'] || '6379'
|
|
5
|
+
}
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
Sidekiq.configure_client do |config|
|
|
9
|
+
config.redis = {
|
|
10
|
+
host: ENV['REDIS_HOST'],
|
|
11
|
+
port: ENV['REDIS_PORT'] || '6379'
|
|
12
|
+
}
|
|
13
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
version: '3.4'
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
app:
|
|
5
|
+
build:
|
|
6
|
+
context: .
|
|
7
|
+
dockerfile: Dockerfile
|
|
8
|
+
depends_on:
|
|
9
|
+
- database
|
|
10
|
+
- redis
|
|
11
|
+
ports:
|
|
12
|
+
- "3000:3000"
|
|
13
|
+
volumes:
|
|
14
|
+
- .:/app
|
|
15
|
+
- gem_cache:/usr/local/bundle/gems
|
|
16
|
+
- node_modules:/app/node_modules
|
|
17
|
+
env_file:
|
|
18
|
+
- ./mise/env/base.env
|
|
19
|
+
- ./mise/env/development.env
|
|
20
|
+
environment:
|
|
21
|
+
RAILS_ENV: development
|
|
22
|
+
|
|
23
|
+
database:
|
|
24
|
+
image: postgres:12.1
|
|
25
|
+
volumes:
|
|
26
|
+
- db_data:/var/lib/postgresql/data
|
|
27
|
+
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
28
|
+
|
|
29
|
+
redis:
|
|
30
|
+
image: redis
|
|
31
|
+
env_file:
|
|
32
|
+
- ./mise/env/base.env
|
|
33
|
+
- ./mise/env/development.env
|
|
34
|
+
|
|
35
|
+
sidekiq:
|
|
36
|
+
build:
|
|
37
|
+
context: .
|
|
38
|
+
dockerfile: Dockerfile
|
|
39
|
+
depends_on:
|
|
40
|
+
- app
|
|
41
|
+
- database
|
|
42
|
+
- redis
|
|
43
|
+
volumes:
|
|
44
|
+
- .:/app
|
|
45
|
+
- gem_cache:/usr/local/bundle/gems
|
|
46
|
+
- node_modules:/app/node_modules
|
|
47
|
+
env_file:
|
|
48
|
+
- ./mise/env/base.env
|
|
49
|
+
- ./mise/env/development.env
|
|
50
|
+
environment:
|
|
51
|
+
RAILS_ENV: development
|
|
52
|
+
entrypoint: ./entrypoints/sidekiq-entrypoint.sh
|
|
53
|
+
|
|
54
|
+
volumes:
|
|
55
|
+
gem_cache:
|
|
56
|
+
db_data:
|
|
57
|
+
node_modules:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|