roro 0.3.17 → 0.3.23
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 +108 -70
- data/.gitignore +35 -8
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/Guardfile +23 -13
- data/README.md +11 -11
- 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 +16 -16
- data/lib/roro/cli.rb +33 -17
- data/lib/roro/common/file_reflection.rb +33 -0
- data/lib/roro/common/utilities.rb +185 -0
- data/lib/roro/configurator.rb +15 -0
- 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/{cli/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/{cli/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/{cli/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/{cli/templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
- data/lib/roro/{cli/templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
- data/lib/roro/{cli/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/{cli/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/{cli/templates/rails/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/{cli/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/{cli/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/{cli/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/{cli/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/{cli/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/{cli/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/{cli/templates/rails/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
- 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/{cli/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/{cli/templates/rails/roro/roro/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/conf/.placeholder} +0 -0
- data/lib/roro/{cli/templates/rails/roro/roro/containers/.keep → 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/{cli/templates/rails/roro/roro/containers/app/.keep → 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/{cli/templates/rails/roro/roro/containers/frontend/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-sql/.placeholder} +0 -0
- data/lib/roro/{cli/templates/ruby_gem/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-src/.placeholder} +0 -0
- data/lib/roro/{cli/templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
- data/lib/roro/{cli/templates/ruby_gem/roro/keys → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
- data/lib/roro/{cli/templates/stories → 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/lib/roro/{cli/templates/stories/with_postgresql → 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/containers → 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/{roro/keys/.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/{sandbox → 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/stacks/stories_v1/greenfield/rails.yml +9 -0
- data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
- data/lib/roro/stacks/stories_v1/greenfield.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd/circleci.yml +2 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database/mysql.yml +17 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database/postgresql.yml +15 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database.yml +9 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/default.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/edge.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails.yml +76 -0
- data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
- data/lib/roro/stacks/stories_v1/rollon/ruby_gem.yml +5 -0
- data/lib/roro/stacks/stories_v1/rollon.yml +42 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/config.yml.tt +4 -6
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/jobs/_build.yml +4 -6
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_push.yml +11 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/workflows/_build_test_push.yml +12 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt +51 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.mysql.yml +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.pg.yml +2 -3
- 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/{cli → stacks/stories_v1}/templates/rails/docker-compose.yml.tt +3 -3
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.mysql.env.tt +6 -0
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.pg.env.tt +4 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/dotenv/web.env.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/kube.rake.tt +114 -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/stacks/stories_v1/templates/rails/roro/containers/app/Dockerfile.tt +34 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
- data/lib/roro/{cli/templates/base/roro/roro/docker-entrypoint.sh.tt → 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/stacks/stories_v1/templates/rails/roro/kube/deployment.yml.tt +50 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/postgres_deploy.yaml +47 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/rails_deploy.yaml +62 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/redis_deploy.yaml +23 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/sidekiq_deploy.yaml +56 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingresses/ingress.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/jobs/setup.yaml +42 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/secret-digital-ocean.yml.tt +4 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/service.yml.tt +10 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/postgres_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/rails_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/redis_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/volumes/postgres_volumes.yaml +25 -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/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/config.yml.tt +4 -4
- data/lib/roro/{cli/templates/base/.circleci/jobs/_build.yml → stacks/stories_v1/templates/ruby_gem/.circleci/jobs/_test.yml} +2 -2
- data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/{cli → 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/{cli → stacks/stories_v1}/templates/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +1 -1
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +1 -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 -4
- 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 +353 -111
- data/lib/roro/cli/base/base.rb +0 -8
- data/lib/roro/cli/base/base_files.rb +0 -24
- data/lib/roro/cli/base/check_dependencies.rb +0 -97
- data/lib/roro/cli/base/continuous_integration.rb +0 -13
- data/lib/roro/cli/base/insert_gems.rb +0 -31
- data/lib/roro/cli/base/insertions.rb +0 -19
- data/lib/roro/cli/base/utilities.rb +0 -38
- data/lib/roro/cli/configuration.rb +0 -69
- data/lib/roro/cli/generate/config/rails.rb +0 -17
- data/lib/roro/cli/generate/config.rb +0 -11
- 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/greenfield/rails.rb +0 -36
- data/lib/roro/cli/rollon/rails/database/with_mysql.rb +0 -22
- data/lib/roro/cli/rollon/rails/database/with_postgresql.rb +0 -21
- data/lib/roro/cli/rollon/rails/database.rb +0 -30
- data/lib/roro/cli/rollon/rails.rb +0 -47
- 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/stories.rb +0 -3
- data/lib/roro/cli/rollon/stories.rb +0 -2
- data/lib/roro/cli/roro_configurator.yml +0 -157
- data/lib/roro/cli/templates/base/.circleci/_defaults.yml +0 -17
- data/lib/roro/cli/templates/base/.circleci/_workflow.yml +0 -2
- data/lib/roro/cli/templates/base/.circleci/config.job-example.yml +0 -33
- data/lib/roro/cli/templates/base/.circleci/jobs/_release.yml +0 -12
- data/lib/roro/cli/templates/base/.circleci/workflows/_build_release.yml +0 -10
- data/lib/roro/cli/templates/base/.dockerignore +0 -51
- data/lib/roro/cli/templates/base/.roro_config.yml +0 -15
- data/lib/roro/cli/templates/base/dotenv +0 -1
- data/lib/roro/cli/templates/base/jumpstart/Dockerfile.tt +0 -30
- data/lib/roro/cli/templates/base/jumpstart/docker-compose.yml +0 -59
- data/lib/roro/cli/templates/base/jumpstart/docker-entrypoint.sh +0 -16
- data/lib/roro/cli/templates/base/livereload/hosts.example +0 -7
- data/lib/roro/cli/templates/rails/.circleci/_aliases.yml +0 -8
- data/lib/roro/cli/templates/rails/.circleci/jobs/_push.yml +0 -23
- data/lib/roro/cli/templates/rails/.circleci/jobs/_test.yml +0 -13
- data/lib/roro/cli/templates/rails/.circleci/workflows/_build_test_push.yml +0 -9
- data/lib/roro/cli/templates/rails/Dockerfile.greenfield.tt +0 -47
- data/lib/roro/cli/templates/rails/database/with_mysql/_service.yml +0 -10
- data/lib/roro/cli/templates/rails/database/with_postgresql/_service.yml +0 -7
- data/lib/roro/cli/templates/rails/dotenv/database.mysql.env.tt +0 -3
- data/lib/roro/cli/templates/rails/dotenv/database.pg.env.tt +0 -4
- data/lib/roro/cli/templates/rails/roro/containers/app/Dockerfile.tt +0 -88
- data/lib/roro/cli/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -1
- data/lib/roro/cli/templates/stories/ruby_gem/with_ci_cd/_build.yml +0 -11
- data/lib/roro/cli/templates/stories/with_mysql/_service.yml +0 -10
- data/lib/roro/cli/templates/stories/with_postgresql/_service.yml +0 -7
- data/lib/tasks/deploy.rake +0 -126
- data/roro/containers/ruby_image/ci.env.enc +0 -2
@@ -0,0 +1,103 @@
|
|
1
|
+
server {
|
2
|
+
listen 80;
|
3
|
+
|
4
|
+
server_name ${SERVER_NAME} ${SERVER_ALT_NAME};
|
5
|
+
root /var/www/html;
|
6
|
+
index index.html index.php;
|
7
|
+
|
8
|
+
client_max_body_size 20M;
|
9
|
+
|
10
|
+
# Security
|
11
|
+
include /etc/nginx/custom.conf.d/nginx-custom-configs.conf;
|
12
|
+
include /etc/nginx/custom.conf.d/nginx-wp-hardening.conf;
|
13
|
+
|
14
|
+
# Prevent Clickjacking
|
15
|
+
add_header X-Frame-Options "SAMEORIGIN";
|
16
|
+
add_header X-Content-Type-Options "nosniff";
|
17
|
+
|
18
|
+
charset utf-8;
|
19
|
+
|
20
|
+
# Set the custom error pages
|
21
|
+
error_page 404 /index.php;
|
22
|
+
error_page 403 /index.php;
|
23
|
+
|
24
|
+
# Logs
|
25
|
+
error_log /dev/stderr;
|
26
|
+
access_log /dev/stdout;
|
27
|
+
|
28
|
+
location ^~ /pma/ {
|
29
|
+
proxy_set_header X-Real-IP $remote_addr;
|
30
|
+
proxy_set_header X-Forwarded-For $remote_addr;
|
31
|
+
proxy_set_header Host $host;
|
32
|
+
proxy_pass http://pma:80/;
|
33
|
+
|
34
|
+
allow ${SECURE_SUBNET};
|
35
|
+
allow 127.0.0.1;
|
36
|
+
deny all;
|
37
|
+
}
|
38
|
+
|
39
|
+
location ~* /xmlrpc.php$ {
|
40
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
41
|
+
include fastcgi_params;
|
42
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
43
|
+
|
44
|
+
allow ${SECURE_SUBNET};
|
45
|
+
allow 127.0.0.1;
|
46
|
+
deny all;
|
47
|
+
}
|
48
|
+
|
49
|
+
# Remove direct access to the following folders & files
|
50
|
+
location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
|
51
|
+
deny all;
|
52
|
+
}
|
53
|
+
|
54
|
+
location ~* /data/public/.*.(ser|htaccess)$ {
|
55
|
+
deny all;
|
56
|
+
}
|
57
|
+
|
58
|
+
# Stops the annoying error messages in the logs
|
59
|
+
location ~* ^/(favicon.ico|robots.txt) {
|
60
|
+
log_not_found off;
|
61
|
+
}
|
62
|
+
|
63
|
+
location = /favicon.ico {
|
64
|
+
expires 1y;
|
65
|
+
log_not_found off;
|
66
|
+
access_log off;
|
67
|
+
}
|
68
|
+
|
69
|
+
location ~ ^/(wp-admin|wp-login.php) {
|
70
|
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
71
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
72
|
+
fastcgi_index index.php;
|
73
|
+
include fastcgi_params;
|
74
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
75
|
+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
76
|
+
|
77
|
+
allow ${SECURE_SUBNET};
|
78
|
+
allow 127.0.0.1;
|
79
|
+
deny all;
|
80
|
+
}
|
81
|
+
|
82
|
+
# Enables PHP
|
83
|
+
location ~ \.php$ {
|
84
|
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
85
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
86
|
+
fastcgi_index index.php;
|
87
|
+
include fastcgi_params;
|
88
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
89
|
+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
90
|
+
}
|
91
|
+
|
92
|
+
# Enables Caching
|
93
|
+
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
94
|
+
expires 7d;
|
95
|
+
add_header Pragma public;
|
96
|
+
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
97
|
+
}
|
98
|
+
|
99
|
+
# The rewrite magic
|
100
|
+
location / {
|
101
|
+
try_files $uri $uri/ /index.php?$args;
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
server {
|
2
|
+
listen 80;
|
3
|
+
server_name ${SERVER_NAME} ${SERVER_ALT_NAME};
|
4
|
+
server_tokens off;
|
5
|
+
|
6
|
+
location /.well-known/acme-challenge/ {
|
7
|
+
root /var/www/certbot;
|
8
|
+
}
|
9
|
+
|
10
|
+
location / {
|
11
|
+
return 301 https://$host$request_uri;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
server {
|
16
|
+
listen 443 ssl;
|
17
|
+
|
18
|
+
server_name ${SERVER_NAME} ${SERVER_ALT_NAME};
|
19
|
+
root /var/www/html;
|
20
|
+
index index.html index.php;
|
21
|
+
|
22
|
+
client_max_body_size 20M;
|
23
|
+
|
24
|
+
# Security
|
25
|
+
include /etc/nginx/custom.conf.d/nginx-custom-configs.conf;
|
26
|
+
include /etc/nginx/custom.conf.d/nginx-wp-hardening.conf;
|
27
|
+
|
28
|
+
# Prevent Clickjacking
|
29
|
+
add_header X-Frame-Options "SAMEORIGIN";
|
30
|
+
add_header X-Content-Type-Options "nosniff";
|
31
|
+
|
32
|
+
charset utf-8;
|
33
|
+
|
34
|
+
# SSL Settings
|
35
|
+
ssl_certificate /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem;
|
36
|
+
ssl_certificate_key /etc/letsencrypt/live/${SERVER_NAME}/privkey.pem;
|
37
|
+
include /etc/letsencrypt/options-ssl-nginx.conf;
|
38
|
+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
39
|
+
|
40
|
+
# Set the custom error pages
|
41
|
+
error_page 404 /index.php;
|
42
|
+
error_page 403 /index.php;
|
43
|
+
|
44
|
+
# Logs
|
45
|
+
error_log /dev/stderr;
|
46
|
+
access_log /dev/stdout;
|
47
|
+
|
48
|
+
location ^~ /pma/ {
|
49
|
+
proxy_set_header X-Real-IP $remote_addr;
|
50
|
+
proxy_set_header X-Forwarded-For $remote_addr;
|
51
|
+
proxy_set_header Host $host;
|
52
|
+
proxy_pass http://pma:80/;
|
53
|
+
|
54
|
+
allow ${SECURE_SUBNET};
|
55
|
+
allow 127.0.0.1;
|
56
|
+
deny all;
|
57
|
+
}
|
58
|
+
|
59
|
+
location ~* /xmlrpc.php$ {
|
60
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
61
|
+
include fastcgi_params;
|
62
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
63
|
+
|
64
|
+
allow ${SECURE_SUBNET};
|
65
|
+
allow 127.0.0.1;
|
66
|
+
deny all;
|
67
|
+
}
|
68
|
+
|
69
|
+
# Remove direct access to the following folders & files
|
70
|
+
location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
|
71
|
+
deny all;
|
72
|
+
}
|
73
|
+
|
74
|
+
location ~* /data/public/.*.(ser|htaccess)$ {
|
75
|
+
deny all;
|
76
|
+
}
|
77
|
+
|
78
|
+
# Stops the annoying error messages in the logs
|
79
|
+
location ~* ^/(favicon.ico|robots.txt) {
|
80
|
+
log_not_found off;
|
81
|
+
}
|
82
|
+
|
83
|
+
location = /favicon.ico {
|
84
|
+
expires 1y;
|
85
|
+
log_not_found off;
|
86
|
+
access_log off;
|
87
|
+
}
|
88
|
+
|
89
|
+
location ~ ^/(wp-admin|wp-login.php) {
|
90
|
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
91
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
92
|
+
fastcgi_index index.php;
|
93
|
+
include fastcgi_params;
|
94
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
95
|
+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
96
|
+
|
97
|
+
allow ${SECURE_SUBNET};
|
98
|
+
allow 127.0.0.1;
|
99
|
+
deny all;
|
100
|
+
}
|
101
|
+
|
102
|
+
# Enables PHP
|
103
|
+
location ~ \.php$ {
|
104
|
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
105
|
+
fastcgi_pass ${WP_CONTAINER_NAME}:9000;
|
106
|
+
fastcgi_index index.php;
|
107
|
+
include fastcgi_params;
|
108
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
109
|
+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
110
|
+
}
|
111
|
+
|
112
|
+
# Enables Caching
|
113
|
+
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
114
|
+
expires 7d;
|
115
|
+
add_header Pragma public;
|
116
|
+
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
117
|
+
}
|
118
|
+
|
119
|
+
# The rewrite magic
|
120
|
+
location / {
|
121
|
+
try_files $uri $uri/ /index.php?$args;
|
122
|
+
}
|
123
|
+
}
|
File without changes
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
version: '3.8'
|
2
|
+
services:
|
3
|
+
|
4
|
+
wordpress:
|
5
|
+
image: ${CUSTOM_WORDPRESS_IMAGE:-my-wordpress}:${WORDPRESS_VERSION:-latest}
|
6
|
+
build:
|
7
|
+
context: wordpress/
|
8
|
+
args:
|
9
|
+
WORDPRESS_VERSION: ${WORDPRESS_VERSION}
|
10
|
+
WORDPRESS_UID: ${WORDPRESS_UID}
|
11
|
+
WORDPRESS_GID: ${WORDPRESS_GID}
|
12
|
+
WORDPRESS_USER: ${WORDPRESS_USER}
|
13
|
+
WORDPRESS_GROUP: ${WORDPRESS_GROUP}
|
14
|
+
|
15
|
+
wordpress-cli:
|
16
|
+
image: ${CUSTOM_WORDPRESS_IMAGE:-my-wordpress}:${WORDPRESS_CLI_VERSION:-latest}
|
17
|
+
build:
|
18
|
+
context: wordpress/
|
19
|
+
args:
|
20
|
+
WORDPRESS_VERSION: ${WORDPRESS_CLI_VERSION}
|
21
|
+
WORDPRESS_UID: ${WORDPRESS_UID}
|
22
|
+
WORDPRESS_GID: ${WORDPRESS_GID}
|
23
|
+
WORDPRESS_USER: ${WORDPRESS_USER}
|
24
|
+
WORDPRESS_GROUP: ${WORDPRESS_GROUP}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
version: '3.8'
|
2
|
+
services:
|
3
|
+
|
4
|
+
wordpress:
|
5
|
+
image: ${WORDPRESS_IMAGE:-wordpress}:${WORDPRESS_DEV_VERSION:-latest}
|
6
|
+
container_name: wordpress
|
7
|
+
volumes:
|
8
|
+
- type: bind
|
9
|
+
source: ${WORDPRESS_DATA_DIR:-./wordpress-src}
|
10
|
+
target: /var/www/html
|
11
|
+
environment:
|
12
|
+
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
13
|
+
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}
|
14
|
+
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
15
|
+
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
16
|
+
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX:-wp_}
|
17
|
+
ports:
|
18
|
+
- 80:80
|
19
|
+
depends_on:
|
20
|
+
- mysql
|
21
|
+
logging:
|
22
|
+
driver: "json-file"
|
23
|
+
options:
|
24
|
+
max-size: "1m"
|
25
|
+
max-file: "5"
|
26
|
+
restart: always
|
27
|
+
|
28
|
+
mysql:
|
29
|
+
image: mariadb:${MARIADB_VERSION:-latest}
|
30
|
+
container_name: mysql
|
31
|
+
volumes:
|
32
|
+
- type: volume
|
33
|
+
source: mysql
|
34
|
+
target: /var/lib/mysql
|
35
|
+
volume:
|
36
|
+
nocopy: true
|
37
|
+
- type: bind
|
38
|
+
source: ${MYSQL_DATA_DIR:-./wordpress-sql}
|
39
|
+
target: /docker-entrypoint-initdb.d
|
40
|
+
read_only: true
|
41
|
+
environment:
|
42
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
|
43
|
+
MYSQL_USER: ${WORDPRESS_DB_USER:-wordpress}
|
44
|
+
MYSQL_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
45
|
+
MYSQL_DATABASE: ${WORDPRESS_DB_NAME:-wordpress}
|
46
|
+
logging:
|
47
|
+
driver: "json-file"
|
48
|
+
options:
|
49
|
+
max-size: "1m"
|
50
|
+
max-file: "5"
|
51
|
+
restart: always
|
52
|
+
|
53
|
+
wordpress-cli:
|
54
|
+
image: ${WORDPRESS_IMAGE:-wordpress}:${WORDPRESS_CLI_VERSION:-latest}
|
55
|
+
volumes:
|
56
|
+
- type: bind
|
57
|
+
source: ./config/php.conf.ini
|
58
|
+
target: /usr/local/etc/php/conf.d/conf.ini
|
59
|
+
read_only: true
|
60
|
+
- type: bind
|
61
|
+
source: ${WORDPRESS_DATA_DIR:-./wordpress-src}
|
62
|
+
target: /var/www/html
|
63
|
+
environment:
|
64
|
+
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
65
|
+
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}
|
66
|
+
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
67
|
+
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
68
|
+
depends_on:
|
69
|
+
- mysql
|
70
|
+
- wordpress
|
71
|
+
logging:
|
72
|
+
driver: "json-file"
|
73
|
+
options:
|
74
|
+
max-size: "1m"
|
75
|
+
max-file: "5"
|
76
|
+
restart: "no"
|
77
|
+
|
78
|
+
pma:
|
79
|
+
image: phpmyadmin/phpmyadmin
|
80
|
+
environment:
|
81
|
+
PMA_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
82
|
+
PMA_PORT: 3306
|
83
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
|
84
|
+
ports:
|
85
|
+
- 8080:80
|
86
|
+
depends_on:
|
87
|
+
- mysql
|
88
|
+
logging:
|
89
|
+
driver: "json-file"
|
90
|
+
options:
|
91
|
+
max-size: "1m"
|
92
|
+
max-file: "5"
|
93
|
+
restart: always
|
94
|
+
|
95
|
+
volumes:
|
96
|
+
mysql:
|
@@ -0,0 +1,147 @@
|
|
1
|
+
version: '3.8'
|
2
|
+
services:
|
3
|
+
|
4
|
+
wordpress:
|
5
|
+
image: ${WORDPRESS_IMAGE:-wordpress}:${WORDPRESS_PROD_VERSION:-latest}
|
6
|
+
container_name: wordpress
|
7
|
+
volumes:
|
8
|
+
- type: bind
|
9
|
+
source: ${WORDPRESS_DATA_DIR:-./wordpress-src}
|
10
|
+
target: /var/www/html
|
11
|
+
environment:
|
12
|
+
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
13
|
+
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}
|
14
|
+
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
15
|
+
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
16
|
+
depends_on:
|
17
|
+
- mysql
|
18
|
+
logging:
|
19
|
+
driver: "json-file"
|
20
|
+
options:
|
21
|
+
max-size: "1m"
|
22
|
+
max-file: "5"
|
23
|
+
restart: always
|
24
|
+
|
25
|
+
mysql:
|
26
|
+
image: mariadb:${MARIADB_VERSION:-latest}
|
27
|
+
container_name: mysql
|
28
|
+
volumes:
|
29
|
+
- type: volume
|
30
|
+
source: mysql
|
31
|
+
target: /var/lib/mysql
|
32
|
+
volume:
|
33
|
+
nocopy: true
|
34
|
+
- type: bind
|
35
|
+
source: ${MYSQL_DATA_DIR:-./wordpress-sql}
|
36
|
+
target: /docker-entrypoint-initdb.d
|
37
|
+
read_only: true
|
38
|
+
environment:
|
39
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
|
40
|
+
MYSQL_USER: ${WORDPRESS_DB_USER:-wordpress}
|
41
|
+
MYSQL_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
42
|
+
MYSQL_DATABASE: ${WORDPRESS_DB_NAME:-wordpress}
|
43
|
+
logging:
|
44
|
+
driver: "json-file"
|
45
|
+
options:
|
46
|
+
max-size: "1m"
|
47
|
+
max-file: "5"
|
48
|
+
restart: always
|
49
|
+
|
50
|
+
wordpress-cli:
|
51
|
+
image: ${WORDPRESS_IMAGE:-wordpress}:${WORDPRESS_CLI_VERSION:-latest}
|
52
|
+
volumes:
|
53
|
+
- type: bind
|
54
|
+
source: ./config/php.conf.ini
|
55
|
+
target: /usr/local/etc/php/conf.d/conf.ini
|
56
|
+
read_only: true
|
57
|
+
- type: bind
|
58
|
+
source: ${WORDPRESS_DATA_DIR:-./wordpress-src}
|
59
|
+
target: /var/www/html
|
60
|
+
environment:
|
61
|
+
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
62
|
+
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME:-wordpress}
|
63
|
+
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER:-wordpress}
|
64
|
+
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:-W0rdpr3Ss.}
|
65
|
+
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX:-wp_}
|
66
|
+
depends_on:
|
67
|
+
- mysql
|
68
|
+
- wordpress
|
69
|
+
logging:
|
70
|
+
driver: "json-file"
|
71
|
+
options:
|
72
|
+
max-size: "1m"
|
73
|
+
max-file: "5"
|
74
|
+
restart: "no"
|
75
|
+
|
76
|
+
pma:
|
77
|
+
image: phpmyadmin/phpmyadmin
|
78
|
+
environment:
|
79
|
+
PMA_HOST: ${WORDPRESS_DB_HOST:-mysql}
|
80
|
+
PMA_PORT: 3306
|
81
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
|
82
|
+
PMA_ABSOLUTE_URI: http://example.com/pma
|
83
|
+
depends_on:
|
84
|
+
- mysql
|
85
|
+
logging:
|
86
|
+
driver: "json-file"
|
87
|
+
options:
|
88
|
+
max-size: "1m"
|
89
|
+
max-file: "5"
|
90
|
+
restart: always
|
91
|
+
|
92
|
+
nginx:
|
93
|
+
image: nginx:${NGINX_VERSION:-latest}
|
94
|
+
container_name: nginx
|
95
|
+
ports:
|
96
|
+
- '80:80'
|
97
|
+
- '443:443'
|
98
|
+
volumes:
|
99
|
+
- type: bind
|
100
|
+
source: ${WORDPRESS_DATA_DIR:-./wordpress-src}
|
101
|
+
target: /var/www/html
|
102
|
+
- type: bind
|
103
|
+
source: ${NGINX_CONF_DIR:-./config/nginx/cfg/}
|
104
|
+
target: /etc/nginx/custom.conf.d
|
105
|
+
- type: bind
|
106
|
+
source: ${NGINX_TEMPLATE_DIR:-./config/nginx/tpl/}
|
107
|
+
target: /etc/nginx/templates/
|
108
|
+
# - type: bind
|
109
|
+
# source: ./data/certbot/conf
|
110
|
+
# target: /etc/letsencrypt
|
111
|
+
# - type: bind
|
112
|
+
# source: ./data/certbot/www
|
113
|
+
# target: /var/www/certbot
|
114
|
+
environment:
|
115
|
+
SERVER_NAME: ${SERVER_NAME:-example.com}
|
116
|
+
SERVER_ALT_NAME: ${SERVER_ALT_NAME:-www.example.com}
|
117
|
+
WP_CONTAINER_NAME: ${WP_CONTAINER_NAME:-wordpress}
|
118
|
+
SECURE_SUBNET: ${SECURE_SUBNET:-192.168.0.0/16}
|
119
|
+
depends_on:
|
120
|
+
- wordpress
|
121
|
+
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" #certobt
|
122
|
+
logging:
|
123
|
+
driver: "json-file"
|
124
|
+
options:
|
125
|
+
max-size: "1m"
|
126
|
+
max-file: "5"
|
127
|
+
restart: always
|
128
|
+
|
129
|
+
# certbot:
|
130
|
+
# image: certbot/certbot
|
131
|
+
# restart: unless-stopped
|
132
|
+
# volumes:
|
133
|
+
# - type: bind
|
134
|
+
# source: ./data/certbot/conf
|
135
|
+
# target: /etc/letsencrypt
|
136
|
+
# - type: bind
|
137
|
+
# source: ./data/certbot/www
|
138
|
+
# target: /var/www/certbot
|
139
|
+
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
140
|
+
# logging:
|
141
|
+
# driver: "json-file"
|
142
|
+
# options:
|
143
|
+
# max-size: "1m"
|
144
|
+
# max-file: "5"
|
145
|
+
|
146
|
+
volumes:
|
147
|
+
mysql:
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
db_host_string=$(cat .env | grep WORDPRESS_DB_HOST)
|
4
|
+
db_host=${db_host_string#*=}
|
5
|
+
|
6
|
+
db_root_string=$(cat .env | grep MYSQL_ROOT_PASSWORD)
|
7
|
+
root_pw=${db_root_string#*=}
|
8
|
+
|
9
|
+
db_name_string=$(cat .env | grep WORDPRESS_DB_NAME)
|
10
|
+
db_name=${db_name_string#*=}
|
11
|
+
|
12
|
+
mysql_path_string=$(cat .env | grep MYSQL_DUMP_DIR)
|
13
|
+
mysql_path=${mysql_path_string#*=}
|
14
|
+
|
15
|
+
dump_name=${mysql_path}/${db_name}.`date +%Y%m%d%H%M%S`.gz
|
16
|
+
docker-compose exec ${db_host} /usr/bin/mysqldump --single-transaction --no-tablespaces --skip-lock-tables -u root -p${root_pw} ${db_name} | gzip -9 > ${dump_name}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
if ! [ -x "$(command -v docker-compose)" ]; then
|
4
|
+
echo 'Error: docker-compose is not installed.' >&2
|
5
|
+
exit 1
|
6
|
+
fi
|
7
|
+
|
8
|
+
domains=(example.com www.example.com)
|
9
|
+
rsa_key_size=4096
|
10
|
+
data_path="./data/certbot"
|
11
|
+
email="youremail@address" # Adding a valid address is strongly recommended
|
12
|
+
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
|
13
|
+
|
14
|
+
if [ -d "$data_path" ]; then
|
15
|
+
read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision
|
16
|
+
if [ "$decision" != "Y" ] && [ "$decision" != "y" ]; then
|
17
|
+
exit
|
18
|
+
fi
|
19
|
+
fi
|
20
|
+
|
21
|
+
|
22
|
+
if [ ! -e "$data_path/conf/options-ssl-nginx.conf" ] || [ ! -e "$data_path/conf/ssl-dhparams.pem" ]; then
|
23
|
+
echo "### Downloading recommended TLS parameters ..."
|
24
|
+
mkdir -p "$data_path/conf"
|
25
|
+
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "$data_path/conf/options-ssl-nginx.conf"
|
26
|
+
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "$data_path/conf/ssl-dhparams.pem"
|
27
|
+
echo
|
28
|
+
fi
|
29
|
+
|
30
|
+
echo "### Creating dummy certificate for $domains ..."
|
31
|
+
path="/etc/letsencrypt/live/$domains"
|
32
|
+
mkdir -p "$data_path/conf/live/$domains"
|
33
|
+
docker-compose run --rm --entrypoint "\
|
34
|
+
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
35
|
+
-keyout '$path/privkey.pem' \
|
36
|
+
-out '$path/fullchain.pem' \
|
37
|
+
-subj '/CN=localhost'" certbot
|
38
|
+
echo
|
39
|
+
|
40
|
+
|
41
|
+
echo "### Starting nginx ..."
|
42
|
+
docker-compose up --force-recreate -d nginx
|
43
|
+
echo
|
44
|
+
|
45
|
+
echo "### Deleting dummy certificate for $domains ..."
|
46
|
+
docker-compose run --rm --entrypoint "\
|
47
|
+
rm -Rf /etc/letsencrypt/live/$domains && \
|
48
|
+
rm -Rf /etc/letsencrypt/archive/$domains && \
|
49
|
+
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
50
|
+
echo
|
51
|
+
|
52
|
+
|
53
|
+
echo "### Requesting Let's Encrypt certificate for $domains ..."
|
54
|
+
#Join $domains to -d args
|
55
|
+
domain_args=""
|
56
|
+
for domain in "${domains[@]}"; do
|
57
|
+
domain_args="$domain_args -d $domain"
|
58
|
+
done
|
59
|
+
|
60
|
+
# Select appropriate email arg
|
61
|
+
case "$email" in
|
62
|
+
"") email_arg="--register-unsafely-without-email" ;;
|
63
|
+
*) email_arg="--email $email" ;;
|
64
|
+
esac
|
65
|
+
|
66
|
+
# Enable staging mode if needed
|
67
|
+
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
68
|
+
|
69
|
+
docker-compose run --rm --entrypoint "\
|
70
|
+
certbot certonly --logs-dir /tmp/ --webroot -w /var/www/certbot \
|
71
|
+
$staging_arg \
|
72
|
+
$email_arg \
|
73
|
+
$domain_args \
|
74
|
+
--rsa-key-size $rsa_key_size \
|
75
|
+
--agree-tos \
|
76
|
+
--force-renewal" certbot
|
77
|
+
echo
|
78
|
+
|
79
|
+
echo "### Reloading nginx ..."
|
80
|
+
docker-compose exec nginx nginx -s reload
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
docker_registry=''
|
4
|
+
|
5
|
+
env_str=$(cat .env | grep ENV)
|
6
|
+
env_value=${env_str#*=}
|
7
|
+
|
8
|
+
wordpress_image_name=$(cat .env | grep CUSTOM_WORDPRESS_IMAGE)
|
9
|
+
wordpress_image_name_value=${wordpress_image_name#*=}
|
10
|
+
|
11
|
+
wordpress_image_version=$(cat .env | grep WORDPRESS_${env_value}_VERSION)
|
12
|
+
wordpress_image_value=${wordpress_image_version#*=}
|
13
|
+
|
14
|
+
if [ -z "$docker_registry" ]; then
|
15
|
+
# Docker hub
|
16
|
+
DOCKER_REGISTRY_PATH="${wordpress_image_name_value}:${wordpress_image_value}"
|
17
|
+
else
|
18
|
+
DOCKER_REGISTRY_PATH="${docker_registry}/${wordpress_image_name_value}:${wordpress_image_value}"
|
19
|
+
fi
|
20
|
+
|
21
|
+
echo $DOCKER_REGISTRY_PATH
|
22
|
+
docker push $DOCKER_REGISTRY_PATH
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ARG WORDPRESS_VERSION
|
2
|
+
FROM wordpress:${WORDPRESS_VERSION}
|
3
|
+
|
4
|
+
USER root
|
5
|
+
|
6
|
+
ARG WORDPRESS_UID
|
7
|
+
ARG WORDPRESS_GID
|
8
|
+
ARG WORDPRESS_USER
|
9
|
+
ARG WORDPRESS_GROUP
|
10
|
+
|
11
|
+
COPY ./adduser.sh /
|
12
|
+
RUN /adduser.sh && rm -rf /adduser.sh
|
13
|
+
|
14
|
+
USER ${WORDPRESS_USER}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
if [ /etc/alpine-release ]; then
|
3
|
+
addgroup --gid ${WORDPRESS_GID} ${WORDPRESS_GROUP} && \
|
4
|
+
adduser \
|
5
|
+
--disabled-password \
|
6
|
+
--gecos "" \
|
7
|
+
--home /var/www/html \
|
8
|
+
--ingroup ${WORDPRESS_GROUP} \
|
9
|
+
--no-create-home \
|
10
|
+
--uid ${WORDPRESS_UID} \
|
11
|
+
${WORDPRESS_USER} && \
|
12
|
+
addgroup ${WORDPRESS_USER} www-data
|
13
|
+
else
|
14
|
+
groupadd -g ${WORDPRESS_GID} ${WORDPRESS_GROUP} && useradd -u ${WORDPRESS_UID} -g ${WORDPRESS_GID} -m -d /var/www/html -s /bin/bash ${WORDPRESS_USER} && usermod -a -G www-data ${WORDPRESS_USER}
|
15
|
+
fi
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|