generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.yaml
32 lines (28 loc) · 1.34 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
name: mongo
pre_install_actions:
- |
#ddev-description:Create config.mongo.yaml with webimage_extra_packages in it
printf '#ddev-generated\nwebimage_extra_packages: ["php${DDEV_PHP_VERSION}-mongodb"]\n' >.ddev/config.mongo.yaml
# Ensure we're on DDEV 1.23+. It's required for the `mongo-express` command (launch by port).
# ddev_version_constraint (see below) is only available in DDEV 1.23.4+, so we keep this check for now.
# Should be removed when DDEV 1.24 is released.
- |
#ddev-nodisplay
#ddev-description:Checking DDEV version
(ddev debug capabilities | grep corepack >/dev/null) || (echo "Please upgrade DDEV to v1.23+ to enable launching." && false)
ddev_version_constraint: ">= v1.23.0"
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 mongo-express:\n ports:\n - 9091:8081\n" > docker-compose.mongo_norouter.yaml
fi
- |
echo "You can now use 'ddev mongo-express' to launch Mongo Express UI"
# list of files and directories listed that are copied into project .ddev directory
project_files:
- commands/mongo/mongosh
- commands/host/mongo-express
- docker-compose.mongo.yaml
- docker-compose.mongo_norouter.yaml