generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstall.yaml
More file actions
54 lines (50 loc) · 1.67 KB
/
install.yaml
File metadata and controls
54 lines (50 loc) · 1.67 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: redis
project_files:
- docker-compose.redis.yaml
- redis/scripts/settings.ddev.redis.php
- redis/scripts/setup-drupal-settings.sh
- redis/scripts/setup-redis-optimized-config.sh
- redis/redis.conf
- redis/advanced.conf
- redis/append.conf
- redis/general.conf
- redis/io.conf
- redis/memory.conf
- redis/network.conf
- redis/security.conf
- redis/snapshots.conf
- commands/host/redis-backend
- commands/redis/redis-cli
- commands/redis/redis-flush
ddev_version_constraint: '>= v1.24.10'
post_install_actions:
- |
#ddev-description:Install redis settings for Drupal 9+ if applicable
redis/scripts/setup-drupal-settings.sh
- |
#ddev-description:Using optimized config if --redis-optimized=true
redis/scripts/setup-redis-optimized-config.sh
- |
#ddev-description:Remove redis/scripts if there are no files
rmdir redis/scripts 2>/dev/null || true
- |
#ddev-description:Remove old `redis` command from `ddev-redis-7`
if grep "#ddev-generated" $DDEV_APPROOT/.ddev/commands/redis/redis > /dev/null 2>&1; then
rm -f "$DDEV_APPROOT/.ddev/commands/redis/redis"
fi
removal_actions:
- |
#ddev-description:Remove redis settings if applicable
files=(
"${DDEV_APPROOT}/${DDEV_DOCROOT}/sites/default/settings.ddev.redis.php"
"${DDEV_APPROOT}/.ddev/docker-compose.redis_extra.yaml"
)
for file in "${files[@]}"; do
if [ -f "$file" ]; then
if grep -q '#ddev-generated' "$file"; then
rm -f "$file"
else
echo "Unwilling to remove '$file' because it does not have #ddev-generated in it; you can manually delete it if it is safe to delete."
fi
fi
done