roro 0.3.18 → 0.3.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +105 -68
- data/.gitignore +34 -8
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/Guardfile +23 -11
- data/README.md +9 -10
- data/bin/console +1 -1
- data/bin/setup +1 -1
- data/docker-compose.yml +3 -3
- data/lib/roro/cli/generate/generate.rb +52 -1
- data/lib/roro/cli/generate/generate_containers.rb +23 -0
- data/lib/roro/cli/generate/generate_environments.rb +25 -0
- data/lib/roro/cli/generate/generate_exposed.rb +11 -0
- data/lib/roro/cli/generate/generate_keys.rb +15 -0
- data/lib/roro/cli/generate/generate_mise.rb +13 -0
- data/lib/roro/cli/generate/generate_obfuscated.rb +14 -0
- data/lib/roro/cli/roll_your_own.rb +12 -0
- data/lib/roro/cli/rollon.rb +11 -138
- data/lib/roro/cli.rb +30 -20
- data/lib/roro/common/file_reflection.rb +33 -0
- data/lib/roro/common/utilities.rb +185 -0
- data/lib/roro/configurator.rb +14 -14
- data/lib/roro/configurators/adventure_case_builder.rb +65 -0
- data/lib/roro/configurators/adventure_chooser.rb +46 -0
- data/lib/roro/configurators/adventure_picker.rb +68 -0
- data/lib/roro/configurators/adventure_writer.rb +34 -0
- data/lib/roro/configurators/catalog_builder.rb +17 -0
- data/lib/roro/configurators/configurator.rb +64 -0
- data/lib/roro/configurators/eligibility.rb +141 -0
- data/lib/roro/configurators/question_asker.rb +29 -0
- data/lib/roro/configurators/question_builder.rb +83 -0
- data/lib/roro/configurators/structure_builder.rb +34 -0
- data/lib/roro/configurators/utilities.rb +188 -0
- data/lib/roro/configurators/validator.rb +109 -0
- data/lib/roro/crypto/cipher.rb +35 -0
- data/lib/roro/crypto/exposer.rb +33 -0
- data/lib/roro/crypto/file_writer.rb +14 -0
- data/lib/roro/crypto/key_writer.rb +35 -0
- data/lib/roro/crypto/obfuscator.rb +25 -0
- data/lib/roro/error.rb +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/fatsufodo.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/Dockerfile.tt +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/requirements.txt.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_two/settings.py +130 -0
- data/lib/roro/{templates/base/jumpstart → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/stage_one_test.rb +37 -0
- data/lib/roro/{templates/base/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_two/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/expressjs.yml +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/flask.yml +14 -0
- data/lib/roro/{templates/base/roro/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/Dockerfile +11 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/app.py +23 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/docker-compose.yml +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/requirements.txt +2 -0
- data/lib/roro/{templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
- data/lib/roro/{templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
- data/lib/roro/{templates/base/roro/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_test.rb +37 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/rails.yml +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/lib/roro/{templates/rails/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/docker-compose.yml.tt +9 -0
- data/lib/roro/{templates/base/roro/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_two/database.yml.tt +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/wordpress.yml +17 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/okonomi.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/roll_your_own.yml +23 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/%interpolated_story_name%.yml.tt +10 -0
- data/lib/roro/{templates/rails → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/templates/stage_one}/.keep +0 -0
- data/lib/roro/{templates/rails/database/with_postgresql → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test}/.keep +0 -0
- data/lib/roro/{templates/rails/dotenv → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one}/.keep +0 -0
- data/lib/roro/{templates/rails/roro → stacks/catalog/unstoppable/developer_styles/okonomi/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/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_test.rb.tt +37 -0
- data/lib/roro/{templates/rails/roro/containers → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/stage_one_test.rb +58 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/omakase.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/rails.yml +13 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/lib/roro/{templates/rails/roro/containers/app/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_two/database.yml.tt +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/.env +38 -0
- data/lib/roro/{templates/rails/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/LICENSE +674 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/README.md +346 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/build.sh +39 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-custom-configs.conf +117 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-wp-hardening.conf +131 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-http.conf.template +103 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-https.conf.example +123 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/php.conf.ini +3 -0
- data/lib/roro/{templates/rails/roro/kube/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/conf/.placeholder} +0 -0
- data/lib/roro/{templates/rails/roro/kube/certificate.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/www/.placeholder} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-build.yml +24 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-dev.yml +96 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-prod.yml +147 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/dump_mysql.sh +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/init_letsencrypt.sh +80 -0
- data/lib/roro/{templates/rails/roro/kube/cluster-issuer.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/mysql-dumps/.placeholder} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/push.sh +22 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/Dockerfile +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/adduser.sh +15 -0
- data/lib/roro/{templates/rails/roro/kube/ingress.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-sql/.placeholder} +0 -0
- data/lib/roro/{templates/rails/roro/kube/job-migrate.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-src/.placeholder} +0 -0
- data/lib/roro/{templates/ruby_gem/.circleci → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
- data/lib/roro/{templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
- data/lib/roro/{templates/ruby_gem/roro/keys → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb +40 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/wordpress.yml +76 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/fatsufodo.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml +36 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/requirements.txt.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_two/settings.py +130 -0
- data/{roro/containers → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/stage_one_test.rb +37 -0
- data/{roro/keys → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_two/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/expressjs.yml +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/rails.yml +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/{sandbox/.keep → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/entrypoint.sh +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_two/database.yml.tt +16 -0
- 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 +22 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/git.sh +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/rvm.sh +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/utilities.sh +53 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base.sh +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_idea.sh +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_repos.sh +33 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_correct_bundler.sh +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_rubies.sh +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize.sh +18 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/roro.sh +15 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/source.sh +28 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/bundle_all.sh +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/git_pull_all.sh +15 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/rvm_install_all.sh +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/yarn_install_all.sh +10 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/wordpress.yml +16 -0
- data/lib/roro/stacks/library/roro/.keep +0 -0
- data/lib/roro/stacks/library/roro/docker_compose/docker-compose.yml +22 -0
- data/lib/roro/stacks/library/roro/k8s/k8s.yml +15 -0
- data/lib/roro/stacks/library/roro/plots/node/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/node/node.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/php/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/php/php.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/django.yml +10 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/Dockerfile +7 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/docker-compose.yml +20 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/requirements.txt +2 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/flask/flask.yml +0 -0
- data/lib/roro/stacks/library/roro/plots/python/python.yml +1 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/mysql.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/postgres.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/rails.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/rails_react.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/rails_vue.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/rails.yml +16 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/ruby_gem/ruby_gem.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/ruby.yml +22 -0
- data/lib/roro/stacks/library/roro/roro/roro.yml +15 -0
- data/lib/roro/{stories → stacks/stories_v1}/greenfield/rails.yml +2 -2
- data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
- data/lib/roro/{stories → stacks/stories_v1}/greenfield.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd/circleci.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/mysql.yml +1 -1
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/postgresql.yml +1 -1
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/default.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/edge.yml +0 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/rails.yml +7 -7
- data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon/ruby_gem.yml +0 -0
- data/lib/roro/{stories → stacks/stories_v1}/rollon.yml +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/config.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_build.yml +1 -1
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_push.yml +1 -1
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/workflows/_build_test_push.yml +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/Dockerfile.greenfield.tt +1 -1
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.mysql.yml +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.pg.yml +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_mysql/_service.yml +10 -0
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/_service.yml +7 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/docker-compose.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.mysql.env.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.pg.env.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/web.env.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/kube.rake.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/containers/app/Dockerfile.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/docker-entrypoint.sh +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/keys/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/certificate.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/cluster-issuer.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployment.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/postgres_deploy.yaml +3 -3
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/rails_deploy.yaml +5 -5
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/redis_deploy.yaml +2 -2
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/sidekiq_deploy.yaml +3 -3
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/ingresses/ingress.yaml +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/jobs/setup.yaml +1 -1
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/secret-digital-ocean.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/service.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/postgres_svc.yaml +2 -2
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/rails_svc.yaml +3 -3
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/redis_svc.yaml +2 -2
- data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/volumes/postgres_volumes.yaml +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/database/env/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/database/scripts/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/env/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/keys/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/bundler.sh +22 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/git.sh +21 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/rvm.sh +38 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/utilities.sh +53 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base.sh +6 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_idea.sh +14 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_repos.sh +33 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_correct_bundler.sh +21 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_rubies.sh +6 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize.sh +18 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/roro.sh +15 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/source.sh +28 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/bundle_all.sh +12 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/git_pull_all.sh +15 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/rvm_install_all.sh +12 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/yarn_install_all.sh +10 -0
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/.circleci/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/config.yml.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/jobs/_test.yml +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/docker-compose.yml +1 -1
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/.keep +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +0 -0
- data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/keys/.keep +0 -0
- data/lib/roro/version.rb +1 -1
- data/lib/roro.rb +60 -5
- data/mise/containers/ruby_gem/Dockerfile +16 -0
- data/mise/containers/ruby_gem/Dockerfile-app +51 -0
- data/{roro/containers/ruby_image/Dockerfile → mise/containers/ruby_gem/Dockerfile-ruby_gem} +0 -0
- data/mise/containers/ruby_gem/env/.keep +0 -0
- data/mise/containers/ruby_gem/env/base.env.enc +1 -0
- data/mise/containers/ruby_gem/env/ci.env.enc +2 -0
- data/mise/containers/ruby_gem/env/development.env.enc +1 -0
- data/mise/containers/ruby_gem/env/production.env.enc +1 -0
- data/mise/containers/ruby_gem/scripts/.keep +0 -0
- data/mise/env/base.env.enc +1 -0
- data/mise/env/ci.env.enc +1 -0
- data/mise/env/development.env.enc +1 -0
- data/mise/env/production.env.enc +1 -0
- data/mise/mise.roro +0 -0
- data/process.yml +401 -0
- data/roro.gemspec +8 -11
- metadata +352 -131
- data/lib/roro/cli/generate/exposed.rb +0 -14
- data/lib/roro/cli/generate/keys.rb +0 -69
- data/lib/roro/cli/generate/obfuscated.rb +0 -17
- data/lib/roro/cli/generate/story.rb +0 -18
- data/lib/roro/cli/greenfield/rails.rb +0 -14
- data/lib/roro/cli/rollon/rails/base/base.rb +0 -4
- data/lib/roro/cli/rollon/rails/base/insert_gems.rb +0 -23
- data/lib/roro/cli/rollon/rails/base/insertions.rb +0 -27
- data/lib/roro/cli/rollon/rails/database/with_mysql.rb +0 -22
- data/lib/roro/cli/rollon/rails/database/with_postgresql.rb +0 -20
- data/lib/roro/cli/rollon/rails/database.rb +0 -26
- data/lib/roro/cli/rollon/ruby_gem/with_ci_cd.rb +0 -45
- data/lib/roro/cli/rollon/ruby_gem.rb +0 -1
- data/lib/roro/cli/rollon/stories.rb +0 -2
- data/lib/roro/configurator/eligibility.rb +0 -137
- data/lib/roro/configurator/okonomi.rb +0 -28
- data/lib/roro/configurator/omakase.rb +0 -170
- data/lib/roro/stories/rollon/rails/kubernetes/postgresql.yml +0 -10
- data/lib/roro/templates/base/.circleci/_aliases.yml +0 -8
- data/lib/roro/templates/base/.circleci/_commands.yml +0 -31
- data/lib/roro/templates/base/.circleci/_defaults.yml +0 -5
- data/lib/roro/templates/base/.circleci/_executors.yml +0 -11
- data/lib/roro/templates/base/.circleci/_major_only.yml +0 -4
- data/lib/roro/templates/base/.circleci/_version.yml +0 -1
- data/lib/roro/templates/base/.circleci/_workflow.yml +0 -2
- data/lib/roro/templates/base/.circleci/config.job-example.yml +0 -33
- data/lib/roro/templates/base/.circleci/jobs/_build.yml +0 -4
- data/lib/roro/templates/base/.circleci/jobs/_release.yml +0 -12
- data/lib/roro/templates/base/.circleci/workflows/_build_release.yml +0 -10
- data/lib/roro/templates/base/.dockerignore +0 -51
- data/lib/roro/templates/base/dotenv +0 -1
- data/lib/roro/templates/base/jumpstart/Dockerfile.tt +0 -30
- data/lib/roro/templates/base/jumpstart/docker-compose.yml +0 -59
- data/lib/roro/templates/base/jumpstart/docker-entrypoint.sh +0 -16
- data/lib/roro/templates/base/livereload/hosts.example +0 -7
- data/lib/roro/templates/rails/.circleci/jobs/_test.yml +0 -12
- data/lib/roro/templates/rails/database/with_mysql/_service.yml +0 -10
- data/lib/roro/templates/rails/database/with_postgresql/_service.yml +0 -7
- data/roro/containers/ruby_image/ci.env.enc +0 -2
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
module Crypto
|
5
|
+
class Exposer
|
6
|
+
|
7
|
+
include Roro::FileReflection
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@writer = Roro::Crypto::FileWriter.new
|
11
|
+
@cipher = Roro::Crypto::Cipher.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def expose_file(file, key)
|
15
|
+
encrypted_content = File.read(file)
|
16
|
+
decrypted_content = @cipher.decrypt(encrypted_content, key)
|
17
|
+
@writer.write_to_file(file.split('.enc').first, decrypted_content)
|
18
|
+
end
|
19
|
+
|
20
|
+
def expose(environments, directory, ext)
|
21
|
+
if environments.empty?
|
22
|
+
environments = gather_environments(directory, ext)
|
23
|
+
else
|
24
|
+
environments.each { |environment| get_key(environment) }
|
25
|
+
end
|
26
|
+
environments.each do |environment|
|
27
|
+
exposable = source_files(directory, "#{environment}*#{ext}")
|
28
|
+
exposable.each { |file| expose_file(file, get_key(environment)) }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
module Crypto
|
5
|
+
|
6
|
+
# Key writer Writes keys arguments for environments, directory and extension where
|
7
|
+
# environments are the names of the keys to be generated, directory
|
8
|
+
# is the destination folders the keys will be wrtten in and extension is
|
9
|
+
# the extension of the key file.
|
10
|
+
|
11
|
+
class KeyWriter
|
12
|
+
include Roro::FileReflection
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
@writer = FileWriter.new
|
16
|
+
@cipher = Cipher.new
|
17
|
+
@mise = Roro::CLI.mise
|
18
|
+
end
|
19
|
+
|
20
|
+
def write_keyfile(environment, extension = '.key')
|
21
|
+
destination = "#{@mise}/keys/#{environment}#{extension}"
|
22
|
+
@writer.write_to_file(destination, @cipher.generate_key)
|
23
|
+
end
|
24
|
+
|
25
|
+
def write_keyfiles(environments = [], directory = nil, extension = nil)
|
26
|
+
directory ||= @mise
|
27
|
+
extension ||= '.key'
|
28
|
+
if environments.empty?
|
29
|
+
environments = gather_environments(directory, '.env').uniq
|
30
|
+
end
|
31
|
+
environments.uniq.each { |environment| write_keyfile(environment, extension) }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Roro
|
2
|
+
module Crypto
|
3
|
+
class Obfuscator
|
4
|
+
include FileReflection
|
5
|
+
def initialize
|
6
|
+
@writer = FileWriter.new
|
7
|
+
@cipher = Cipher.new
|
8
|
+
@mise = Roro::CLI.mise
|
9
|
+
end
|
10
|
+
|
11
|
+
def obfuscate_file(file, key)
|
12
|
+
encrypted_content = @cipher.encrypt(File.read(file), key)
|
13
|
+
@writer.write_to_file(file + '.enc', encrypted_content)
|
14
|
+
end
|
15
|
+
|
16
|
+
def obfuscate(environments = [], directory = @mise, extension = '.env')
|
17
|
+
environments = gather_environments(directory, extension) if environments.empty?
|
18
|
+
environments.each do |environment|
|
19
|
+
obfuscatable = source_files(directory, "#{environment}*#{extension}")
|
20
|
+
obfuscatable.each { |file| obfuscate_file(file, get_key(environment))}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/roro/error.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class Error < StandardError; end
|
5
|
+
class CatalogError < Error; end
|
6
|
+
class StoryError < Error; end
|
7
|
+
|
8
|
+
module Catalog
|
9
|
+
class Keys < Error; end
|
10
|
+
class Empty < Error; end
|
11
|
+
class Story < Error; end
|
12
|
+
class OutlineError < Error; end
|
13
|
+
class StoryError < Error; end
|
14
|
+
class KeyError < Error; end
|
15
|
+
class ContentKeyError < Error; end
|
16
|
+
class ContentError < Error; end
|
17
|
+
class ContentStructureError < Error; end
|
18
|
+
end
|
19
|
+
|
20
|
+
module Crypto
|
21
|
+
class KeyError < Error; end
|
22
|
+
|
23
|
+
class EnvironmentError < Error; end
|
24
|
+
|
25
|
+
class DataDestructionError < Error; end
|
26
|
+
|
27
|
+
class EncryptableError < Error; end
|
28
|
+
|
29
|
+
class DecryptableError < Error; end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
preface: Fast food.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
preface: Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.
|
2
|
+
env:
|
3
|
+
base:
|
4
|
+
python_version:
|
5
|
+
name: Python version
|
6
|
+
value: 3
|
7
|
+
help: https://www.python.org/doc/versions/
|
8
|
+
POSTGRES_DB:
|
9
|
+
name: Postgres databasconfigurarbe name
|
10
|
+
value: postgres
|
11
|
+
help: https://www.postgresql.org/docs/9.0/manage-ag-createdb.html
|
12
|
+
POSTGRES_USER:
|
13
|
+
name: Postgres user name
|
14
|
+
value: postgres
|
15
|
+
help: https://www.postgresql.org/docs/8.0/user-manag.html#DATABASE-USERS
|
16
|
+
POSTGRES_PASSWORD:
|
17
|
+
name: Postgres password
|
18
|
+
value: password
|
19
|
+
help: https://www.postgresql.org/docs/8.0/sql-alteruser.html
|
20
|
+
app_name:
|
21
|
+
name: Then name of your application or project
|
22
|
+
value: unstoppable_django
|
23
|
+
help: https://www.forbes.com/sites/allbusiness/2016/10/23/12-tips-for-naming-your-startup-business/
|
24
|
+
|
25
|
+
actions:
|
26
|
+
- directory 'stage_one', '.', @env
|
27
|
+
- run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . && sudo chown -R $USER:$USER ."
|
28
|
+
- |
|
29
|
+
run "sudo docker-compose run web django-admin startproject \"#{@env[:base][:app_name][:value]}\" . &&
|
30
|
+
sudo chown -R $USER:$USER ."
|
31
|
+
- directory 'stage_two/settings.py', "./#{@env[:base][:app_name][:value]}/", @env
|
32
|
+
- |
|
33
|
+
run "sudo chown -R $USER:$USER . &&
|
34
|
+
sudo docker-compose build &&
|
35
|
+
sudo docker-compose up -d --force-recreate"
|
36
|
+
- run "echo 'You may open your app at http://localhost:8000/'"
|
37
|
+
|
38
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
version: "3"
|
2
|
+
|
3
|
+
services:
|
4
|
+
db:
|
5
|
+
image: postgres
|
6
|
+
volumes:
|
7
|
+
- ./data/db:/var/lib/postgresql/data
|
8
|
+
environment:
|
9
|
+
- POSTGRES_DB=<%= @env[:base][:POSTGRES_DB][:value] %>
|
10
|
+
- POSTGRES_USER=<%= @env[:base][:POSTGRES_USER][:value] %>
|
11
|
+
- POSTGRES_PASSWORD=<%= @env[:base][:POSTGRES_PASSWORD][:value] %>
|
12
|
+
web:
|
13
|
+
build: .
|
14
|
+
command: python manage.py runserver 0.0.0.0:8000
|
15
|
+
volumes:
|
16
|
+
- .:/code
|
17
|
+
ports:
|
18
|
+
- "8000:8000"
|
19
|
+
depends_on:
|
20
|
+
- db
|
@@ -0,0 +1,130 @@
|
|
1
|
+
"""
|
2
|
+
Django settings for <%= @env[:base][:POSTGRES_DB][:value] %> project.
|
3
|
+
|
4
|
+
Generated by 'django-admin startproject' using Django 3.2.8.
|
5
|
+
|
6
|
+
For more information on this file, see
|
7
|
+
https://docs.djangoproject.com/en/3.2/topics/settings/
|
8
|
+
|
9
|
+
For the full list of settings and their values, see
|
10
|
+
https://docs.djangoproject.com/en/3.2/ref/settings/
|
11
|
+
"""
|
12
|
+
|
13
|
+
from pathlib import Path
|
14
|
+
|
15
|
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
16
|
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
17
|
+
|
18
|
+
|
19
|
+
# Quick-start development settings - unsuitable for production
|
20
|
+
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
|
21
|
+
|
22
|
+
# SECURITY WARNING: keep the secret key used in production secret!
|
23
|
+
SECRET_KEY = 'django-insecure-p!ndt2*mek)30&60gxab$j1s$_j1$p3wedmeq2a)3j4$q+py%r'
|
24
|
+
|
25
|
+
# SECURITY WARNING: don't run with debug turned on in production!
|
26
|
+
DEBUG = True
|
27
|
+
|
28
|
+
ALLOWED_HOSTS = ['0.0.0.0']
|
29
|
+
|
30
|
+
|
31
|
+
# Application definition
|
32
|
+
|
33
|
+
INSTALLED_APPS = [
|
34
|
+
'django.contrib.admin',
|
35
|
+
'django.contrib.auth',
|
36
|
+
'django.contrib.contenttypes',
|
37
|
+
'django.contrib.sessions',
|
38
|
+
'django.contrib.messages',
|
39
|
+
'django.contrib.staticfiles',
|
40
|
+
]
|
41
|
+
|
42
|
+
MIDDLEWARE = [
|
43
|
+
'django.middleware.security.SecurityMiddleware',
|
44
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
45
|
+
'django.middleware.common.CommonMiddleware',
|
46
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
47
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
48
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
49
|
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
50
|
+
]
|
51
|
+
|
52
|
+
ROOT_URLCONF = '<%= @env[:base][:POSTGRES_DB][:value] %>.urls'
|
53
|
+
|
54
|
+
TEMPLATES = [
|
55
|
+
{
|
56
|
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
57
|
+
'DIRS': [],
|
58
|
+
'APP_DIRS': True,
|
59
|
+
'OPTIONS': {
|
60
|
+
'context_processors': [
|
61
|
+
'django.template.context_processors.debug',
|
62
|
+
'django.template.context_processors.request',
|
63
|
+
'django.contrib.auth.context_processors.auth',
|
64
|
+
'django.contrib.messages.context_processors.messages',
|
65
|
+
],
|
66
|
+
},
|
67
|
+
},
|
68
|
+
]
|
69
|
+
|
70
|
+
WSGI_APPLICATION = '<%= @env[:base][:POSTGRES_DB][:value] %>.wsgi.application'
|
71
|
+
|
72
|
+
|
73
|
+
# Database
|
74
|
+
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
75
|
+
|
76
|
+
DATABASES = {
|
77
|
+
'default': {
|
78
|
+
'ENGINE': 'django.db.backends.postgresql',
|
79
|
+
'NAME': 'postgres',
|
80
|
+
'USER': 'postgres',
|
81
|
+
'PASSWORD': 'postgres',
|
82
|
+
'HOST': 'db',
|
83
|
+
'PORT': 5432,
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# Password validation
|
90
|
+
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
|
91
|
+
|
92
|
+
AUTH_PASSWORD_VALIDATORS = [
|
93
|
+
{
|
94
|
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
95
|
+
},
|
96
|
+
{
|
97
|
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
98
|
+
},
|
99
|
+
{
|
100
|
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
101
|
+
},
|
102
|
+
{
|
103
|
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
104
|
+
},
|
105
|
+
]
|
106
|
+
|
107
|
+
|
108
|
+
# Internationalization
|
109
|
+
# https://docs.djangoproject.com/en/3.2/topics/i18n/
|
110
|
+
|
111
|
+
LANGUAGE_CODE = 'en-us'
|
112
|
+
|
113
|
+
TIME_ZONE = 'UTC'
|
114
|
+
|
115
|
+
USE_I18N = True
|
116
|
+
|
117
|
+
USE_L10N = True
|
118
|
+
|
119
|
+
USE_TZ = True
|
120
|
+
|
121
|
+
|
122
|
+
# Static files (CSS, JavaScript, Images)
|
123
|
+
# https://docs.djangoproject.com/en/3.2/howto/static-files/
|
124
|
+
|
125
|
+
STATIC_URL = '/static/'
|
126
|
+
|
127
|
+
# Default primary key field type
|
128
|
+
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
129
|
+
|
130
|
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
describe 'Roro::CLI#rollon' do
|
4
|
+
Given(:workbench) { 'django' }
|
5
|
+
Given(:cli) { Roro::CLI.new }
|
6
|
+
Given(:overrides) { %w[] }
|
7
|
+
|
8
|
+
Given(:rollon) {
|
9
|
+
stub_adventure
|
10
|
+
stub_overrides
|
11
|
+
stub_run_actions
|
12
|
+
quiet { cli.rollon }
|
13
|
+
}
|
14
|
+
|
15
|
+
context 'when fatsufodo django' do
|
16
|
+
Given(:adventures) { %w[1 1] }
|
17
|
+
|
18
|
+
Given { rollon }
|
19
|
+
|
20
|
+
context 'when default variables' do
|
21
|
+
Then { assert_file 'Dockerfile', /python:3/ }
|
22
|
+
And { assert_file 'docker-compose.yml', /=password/ }
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'when overrides variables' do
|
26
|
+
When(:overrides) { %w[3.2 y y newpass] }
|
27
|
+
Then { assert_file 'Dockerfile', /python:3.2/ }
|
28
|
+
And { assert_file 'docker-compose.yml', /=newpass/ }
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'stage two' do
|
32
|
+
When(:overrides) { %w[3.2 y y newpass] }
|
33
|
+
Then { assert_file 'Dockerfile', /python:3.2/ }
|
34
|
+
And { assert_file 'docker-compose.yml', /=newpass/ }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
version: '3'
|
2
|
+
services:
|
3
|
+
api:
|
4
|
+
image: sample-express-app
|
5
|
+
build: .
|
6
|
+
networks:
|
7
|
+
- backend
|
8
|
+
ports:
|
9
|
+
- "3000:3000"
|
10
|
+
volumes:
|
11
|
+
- ./:/usr/src/app
|
12
|
+
|
13
|
+
web-cli:
|
14
|
+
image: sample-express-app
|
15
|
+
networks:
|
16
|
+
- backend
|
17
|
+
command: sh
|
18
|
+
|
19
|
+
networks:
|
20
|
+
backend:
|
21
|
+
driver: bridge
|
@@ -0,0 +1,14 @@
|
|
1
|
+
preface: some string
|
2
|
+
|
3
|
+
env:
|
4
|
+
base:
|
5
|
+
app_name:
|
6
|
+
name: Name for your app
|
7
|
+
value: 'unstoppable app name'
|
8
|
+
|
9
|
+
actions:
|
10
|
+
- directory 'stage_one', '.', @env
|
11
|
+
- run "docker-compose build"
|
12
|
+
- run "docker-compose up -d"
|
13
|
+
- run "echo 'You may open your app at http://localhost:5000/'"
|
14
|
+
- run "docker-compose down"
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# syntax=docker/dockerfile:1
|
2
|
+
FROM python:3.7-alpine
|
3
|
+
WORKDIR /code
|
4
|
+
ENV FLASK_APP=app.py
|
5
|
+
ENV FLASK_RUN_HOST=0.0.0.0
|
6
|
+
RUN apk add --no-cache gcc musl-dev linux-headers
|
7
|
+
COPY requirements.txt requirements.txt
|
8
|
+
RUN pip install -r requirements.txt
|
9
|
+
EXPOSE 5000
|
10
|
+
COPY . .
|
11
|
+
CMD ["flask", "run"]
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import time
|
2
|
+
|
3
|
+
import redis
|
4
|
+
from flask import Flask
|
5
|
+
|
6
|
+
app = Flask(__name__)
|
7
|
+
cache = redis.Redis(host='redis', port=6379)
|
8
|
+
|
9
|
+
def get_hit_count():
|
10
|
+
retries = 5
|
11
|
+
while True:
|
12
|
+
try:
|
13
|
+
return cache.incr('hits')
|
14
|
+
except redis.exceptions.ConnectionError as exc:
|
15
|
+
if retries == 0:
|
16
|
+
raise exc
|
17
|
+
retries -= 1
|
18
|
+
time.sleep(0.5)
|
19
|
+
|
20
|
+
@app.route('/')
|
21
|
+
def hello():
|
22
|
+
count = get_hit_count()
|
23
|
+
return 'Hello World! I have been seen {} times.\n'.format(count)
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
describe 'lib roro stacks catalog unstoppable developer_styles fatsufodo stories flask' do
|
4
|
+
Given(:workbench) { 'empty' }
|
5
|
+
Given(:cli) { Roro::CLI.new }
|
6
|
+
Given(:adventures) { %w[1 3] }
|
7
|
+
Given(:overrides) { %w[] }
|
8
|
+
|
9
|
+
Given(:rollon) {
|
10
|
+
## Answers adventure questions according to values set in the :adventures array.
|
11
|
+
stub_adventure
|
12
|
+
## Answers environment variable questions according to values set in
|
13
|
+
# the overrides array. Defaults to 'y'.
|
14
|
+
stub_overrides
|
15
|
+
## Ensures Thor run commands are stubbed.
|
16
|
+
stub_run_actions
|
17
|
+
## Tests will hang with an empty adventures array.
|
18
|
+
# cli.rollon
|
19
|
+
## To quiet the test output do:
|
20
|
+
quiet { cli.rollon }
|
21
|
+
}
|
22
|
+
|
23
|
+
Given { rollon unless adventures.empty?}
|
24
|
+
|
25
|
+
context 'when default variables interpolated' do
|
26
|
+
Then { assert_file "app.py", /import time/ }
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'when many items interpolated' do
|
30
|
+
# Given(:contents) { [:env, :preface, :actions] }
|
31
|
+
# Then {
|
32
|
+
# contents.each { |c|
|
33
|
+
# assert_file "lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask", c
|
34
|
+
# }
|
35
|
+
# }
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,12 @@
|
|
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
|
+
actions:
|
5
|
+
- directory 'stage_one', '.', @env
|
6
|
+
- system "sudo docker-compose build"
|
7
|
+
- system "sudo docker-compose run --no-deps web rails new . --force"
|
8
|
+
- system "sudo chown -R $USER:$USER ."
|
9
|
+
- system "sudo docker-compose build"
|
10
|
+
- system "sudo chown -R $USER:$USER ."
|
11
|
+
- system "sudo docker-compose run web rake db:create"
|
12
|
+
- system "sudo docker-compose up -d"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# syntax=docker/dockerfile:1
|
2
|
+
FROM ruby:2.5
|
3
|
+
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
|
4
|
+
WORKDIR /myapp
|
5
|
+
COPY Gemfile /myapp/Gemfile
|
6
|
+
COPY Gemfile.lock /myapp/Gemfile.lock
|
7
|
+
RUN bundle install
|
8
|
+
|
9
|
+
# Add a script to be executed every time the container starts.
|
10
|
+
COPY entrypoint.sh /usr/bin/
|
11
|
+
RUN chmod +x /usr/bin/entrypoint.sh
|
12
|
+
ENTRYPOINT ["entrypoint.sh"]
|
13
|
+
EXPOSE 3000
|
14
|
+
|
15
|
+
# Configure the main process to run when running the image
|
16
|
+
CMD ["rails", "server", "-b", "0.0.0.0"]
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
version: "3"
|
2
|
+
|
3
|
+
services:
|
4
|
+
db:
|
5
|
+
image: mysql:5.7
|
6
|
+
volumes:
|
7
|
+
- db_data:/var/lib/mysql
|
8
|
+
restart: always
|
9
|
+
environment:
|
10
|
+
MYSQL_ROOT_PASSWORD: somewordpress
|
11
|
+
MYSQL_DATABASE: wordpress
|
12
|
+
MYSQL_USER: wordpress
|
13
|
+
MYSQL_PASSWORD: wordpress
|
14
|
+
|
15
|
+
wordpress:
|
16
|
+
depends_on:
|
17
|
+
- db
|
18
|
+
image: wordpress:latest
|
19
|
+
volumes:
|
20
|
+
- wordpress_data:/var/www/html
|
21
|
+
ports:
|
22
|
+
- "8000:80"
|
23
|
+
restart: always
|
24
|
+
environment:
|
25
|
+
WORDPRESS_DB_HOST: db:3306
|
26
|
+
WORDPRESS_DB_USER: wordpress
|
27
|
+
WORDPRESS_DB_PASSWORD: wordpress
|
28
|
+
WORDPRESS_DB_NAME: wordpress
|
29
|
+
volumes:
|
30
|
+
db_data: {}
|
31
|
+
wordpress_data: {}
|