diff --git a/README.md b/README.md index 820595a..afa5c6a 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ Mongo Express can now be started on demand using the `ddev mongo-express` comman ## Caveats: -- The php extension (`phpX.X-mongodb`) is set up in `.ddev/config.mongo.yaml` using `webimage_extra_packages`. You may want to edit your `.ddev/config.yaml` to do what you want and remove the `.ddev/config.mongo.yaml`. - You can't define custom MongoDB configuration with this current setup. - You can't use `ddev import-db` to import to mongo. diff --git a/config.mongo.yaml b/config.mongo.yaml new file mode 100644 index 0000000..45643db --- /dev/null +++ b/config.mongo.yaml @@ -0,0 +1,2 @@ +#ddev-generated +webimage_extra_packages: ["php${DDEV_PHP_VERSION}-mongodb"] diff --git a/install.yaml b/install.yaml index 8e300b2..1eb9dc4 100644 --- a/install.yaml +++ b/install.yaml @@ -1,24 +1,19 @@ 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 +project_files: + - commands/mongo/mongosh + - commands/host/mongo-express + - config.mongo.yaml + - docker-compose.mongo.yaml + - docker-compose.mongo_norouter.yaml ddev_version_constraint: '>= v1.24.4' 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" - -project_files: - - commands/mongo/mongosh - - commands/host/mongo-express - - docker-compose.mongo.yaml - - docker-compose.mongo_norouter.yaml