generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.yaml
More file actions
37 lines (32 loc) · 1.39 KB
/
install.yaml
File metadata and controls
37 lines (32 loc) · 1.39 KB
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
name: redis-insight
dependencies:
- ddev/ddev-redis
project_files:
- docker-compose.redis-insight.yaml
- docker-compose.redis-insight_norouter.yaml
- commands/host/redis-insight
ddev_version_constraint: '>= v1.24.10'
post_install_actions:
- |
#ddev-description:If router disabled, directly expose port
if ( {{ contains "ddev-router" (list .DdevGlobalConfig.omit_containers | toString) }} ); then
printf "#ddev-generated\nservices:\n redis-insight:\n ports:\n - 5540:5540\n" > docker-compose.redis-insight_norouter.yaml
fi
- |
#ddev-description:If Redis is optimized, set a password
if [ "$(ddev dotenv get .ddev/.env.redis --redis-optimized 2>/dev/null)" = "true" ]; then
printf "#ddev-generated\nservices:\n redis-insight:\n environment:\n - RI_REDIS_PASSWORD=redis\n" > docker-compose.redis-insight_password.yaml
fi
- |
echo "You can now use 'ddev redis-insight' to launch Redis Insight UI"
removal_actions:
- |
#ddev-description:Remove docker-compose.redis-insight_password.yaml file
file=docker-compose.redis-insight_password.yaml
if [ -f "${file}" ]; then
if grep -q '#ddev-generated' "${file}"; then
rm -f "${file}"
else
echo "Unwilling to remove '$DDEV_APPROOT/.ddev/${file}' because it does not have #ddev-generated in it; you can manually delete it if it is safe to delete."
fi
fi