From 09f15d5b8e24bf51a2e81096ebacb038a5127ab6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 1 Aug 2021 10:03:05 +0200 Subject: [PATCH] Add example app ReadMe --- roles/whoami/README.md | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 roles/whoami/README.md diff --git a/roles/whoami/README.md b/roles/whoami/README.md new file mode 100644 index 0000000..1e4dd91 --- /dev/null +++ b/roles/whoami/README.md @@ -0,0 +1,51 @@ +# whoami + +A very simple service application stack role which can be used to base other roles off of. +Contains only a single deployed image and a couple of simple variables to set. + +## Variables + +``` +whoami_upstream_file_dir: "{{ docker_stack_files_dir }}/{{ stack.name }}" +``` + +The on-target directory where the proxy configuration file should be stashed. + +``` +whoami_use_https: true +``` + +Whether the service should be reachable through http (port 80) or through https (port 443) and provision an https certificate. Usually you will want this to stay `true`. + +``` +whoami_version: latest +``` + +The docker image version to be used in stack creation. + +## Internal variables + +``` +stack: + name: whoami + compose: "{{ lookup('template', 'docker-stack.yml.j2') | from_yaml }}" +``` + +The name of the stack to be provisioned and the compose file to be used. +See caddy ReadMe for configuration. + +``` +stack_image: "containous/whoami" +``` + +The docker hub image to be use in provisioning. + +## Simple single-container stack repurposing + +If basing another single-container 'stack' on it, only the variables in defaults and vars have to be replaced for another fully functioning stack. +The fastest way to accomplish this is with rg and sed: + +``` +rg 'containous/whoami' --files-with-matches | xargs sed -i 's|containous/whoami||g' +rg whoami --files-with-matches | xargs sed -i 's/whoami/wallabag/g' +```