Skip to content

Commit 89c4e14

Browse files
authored
fix: add config.mongo.yaml to project files, fixes #25 (#27)
1 parent 1172caa commit 89c4e14

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Mongo Express can now be started on demand using the `ddev mongo-express` comman
5050

5151
## Caveats:
5252

53-
- 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`.
5453
- You can't define custom MongoDB configuration with this current setup.
5554
- You can't use `ddev import-db` to import to mongo.
5655

config.mongo.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#ddev-generated
2+
webimage_extra_packages: ["php${DDEV_PHP_VERSION}-mongodb"]

install.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
name: mongo
22

3-
pre_install_actions:
4-
- |
5-
#ddev-description:Create config.mongo.yaml with webimage_extra_packages in it
6-
printf '#ddev-generated\nwebimage_extra_packages: ["php${DDEV_PHP_VERSION}-mongodb"]\n' >.ddev/config.mongo.yaml
3+
project_files:
4+
- commands/mongo/mongosh
5+
- commands/host/mongo-express
6+
- config.mongo.yaml
7+
- docker-compose.mongo.yaml
8+
- docker-compose.mongo_norouter.yaml
79

810
ddev_version_constraint: '>= v1.24.4'
911

1012
post_install_actions:
1113
- |
1214
#ddev-description:If router disabled, directly expose port
13-
#
1415
if ( {{ contains "ddev-router" (list .DdevGlobalConfig.omit_containers | toString) }} ); then
1516
printf "#ddev-generated\nservices:\n mongo-express:\n ports:\n - 9091:8081\n" > docker-compose.mongo_norouter.yaml
1617
fi
1718
- |
1819
echo "You can now use 'ddev mongo-express' to launch Mongo Express UI"
19-
20-
project_files:
21-
- commands/mongo/mongosh
22-
- commands/host/mongo-express
23-
- docker-compose.mongo.yaml
24-
- docker-compose.mongo_norouter.yaml

0 commit comments

Comments
 (0)