generated from ddev/ddev-memcached
-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
install.yaml
118 lines (102 loc) · 5.39 KB
/
install.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Details about the install.yaml file are at https://ddev.readthedocs.io/en/stable/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml
name: addon-template
# pre_install_actions - list of actions to run before installing the addon.
# Examples would be removing an extraneous docker volume,
# or doing a sanity check for requirements.
# DDEV environment variables can be interpolated into these actions
# pre_install_actions are executed in the context of the target project's root directory.
pre_install_actions:
# - |
# #ddev-description:Check architecture type for incompatible arm64 type
# if [ "$(uname -m)" = "arm64" -o "$(uname -m)" = "aarch64" ]; then
# echo "This package does not work on arm64 (Apple Silicon) machines";
# exit 1;
# fi
# - "docker volume rm ddev-${DDEV_PROJECT}_solr 2>/dev/null || true"
# You can also check for client DDEV version with ddev_version_constraint (see below).
# - |
# #ddev-description:Checking DDEV version
# if ! ( ddev debug capabilities 2>/dev/null | grep corepack >/dev/null 2>&1 ) ; then
# echo "This add-on requires DDEV v1.23+ or higher, please upgrade." && exit 2
# fi
# - 'echo "what is your platform.sh token" && read x'
# This item shows templating using DDEV environment variables.
# - |
# #ddev-description:Touch a file to create it
# touch ${DDEV_APPROOT}/.ddev/somefile.${DDEV_PROJECT_TYPE}.${DDEV_DOCROOT}.txt
# This item shows complex go templating possibilities based on yaml_read_files
# - |
# #ddev-description:Create a config.platformsh.yaml
# cat <<EOF >${DDEV_APPROOT}/.ddev/config.platformsh.yaml
# php_version: {{ trimPrefix "php:" .platformapp.type }}
# database:
# type: {{ regexReplaceAll ":.*$" .services.db.type "" }}
# version: {{ regexReplaceAll "^.*:" .services.db.type "" }}
# docroot: {{ dig "web" "locations" "/" "root" "notfound" .platformapp }}
# {{- if eq .platformapp.build.flavor "composer" }}
# hooks:
# post-start:
# - composer: install
# {{- if .platformapp.hooks.deploy }}
# - exec: "{{ trimAll "\n" .platformapp.hooks.deploy | splitList "\n" | join ` && ` }}"
# {{- end }}
# {{- end }}
# EOF
# list of files and directories listed that are copied into project .ddev directory
# Each file should contain #ddev-generated so it can be replaced by a later `ddev add-on get`
# if it hasn't been modified by the user.
# DDEV environment variables can be interpolated into these filenames
# If you use directories, they must be directories that are managed
# by this add-on, or removal could remove things that are not owned by it
project_files:
- docker-compose.addon-template.yaml
# - commands/web/add-on-command
# - commands/host/add-on-command-host
# - web-build/Dockerfile.addon-template
# - some-directory/file1.txt
# - some-directory/file2.txt
# - extra_files_dir_created_by_this_template/
# - somefile.sh
# List of files and directories that are copied into the global .ddev directory
# DDEV environment variables can be interpolated into these filenames
# Note that if these files are used by a team, you will need to automate their installation
# by adding `ddev add-on get` to your workflow to ensure that everyone has them.
# Otherwise, use 'project_files' to commit them to the repository.
global_files:
# - commands/web/add-on-command
# - homeadditions/some-file.txt
# Version constraint for DDEV that will be validated against the running DDEV executable
# and prevent add-on from being installed if it doesn't validate.
# See https://github.com/Masterminds/semver#checking-version-constraints for constraint rules.
# Available with DDEV v1.23.4+, and works only for DDEV v1.23.4+ binaries
# example: ddev_version_constraint: '>= v1.23.4'
ddev_version_constraint: ''
# List of add-on names that this add-on depends on
dependencies:
# - redis
# DDEV environment variables can be interpolated into these actions.
# post_install_actions are executed in the context of the target project's .ddev directory.
post_install_actions:
# - chmod +x ~/.ddev/commands/web/somecommand
# - touch ${DDEV_APPROOT}/somefile.${GOOS}.${DDEV_WEBSERVER}
# - perl -pi -e 's/oldstring/newstring/g' ${DDEV_APPROOT}/.ddev/docker-compose.addon-template.yaml
# Shell actions that can be done during removal of the add-on.
# Files listed in project_files section will be automatically removed here if they contain #ddev-generated line.
# removal_actions are executed in the context of the target project's .ddev directory.
removal_actions:
# - rm ~/.ddev/commands/web/somecommand
# - |
# if [ -f ${DDEV_APPROOT}/.ddev/docker-compose.addon-template_extras.yaml ]; then
# if grep -q '#ddev-generated' ${DDEV_APPROOT}/.ddev/docker-compose.addon-template_extras.yaml; then
# rm -f ${DDEV_APPROOT}/.ddev/docker-compose.addon-template_extras.yaml
# else
# echo "Unwilling to remove '${DDEV_APPROOT}/.ddev/docker-compose.addon-template_extras.yaml' because it does not have #ddev-generated in it; you can manually delete it if it is safe to delete."
# fi
# fi
# Advanced usage - YAML files can be read in and then used as go template actions
# in pre_install_actions and post_install_actions
# See example in
# https://github.com/ddev/ddev/blob/master/cmd/ddev/cmd/testdata/TestCmdAddonComplex/recipe/install.yaml
yaml_read_files:
# someyaml: someyaml.yaml
# otheryaml: someotheryaml.yaml