You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert MongoDB tutorial to PHP Attributes (#2079)
* Convert MongoDB tutorial to PHP Attributes
api-platform/doctrine-odm is required but mapping.paths automatically contains ODM Document dir
* Switch to mongodb-community-server
Copy file name to clipboardExpand all lines: core/mongodb.md
+31-68Lines changed: 31 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ services:
49
49
# ...
50
50
db-mongodb:
51
51
# In production, you may want to use a managed database service
52
-
image: mongo
52
+
image: mongodb/mongodb-community-server:latest
53
53
environment:
54
-
- MONGO_INITDB_DATABASE=api
55
-
- MONGO_INITDB_ROOT_USERNAME=api-platform
54
+
- MONGODB_INITDB_DATABASE=api
55
+
- MONGODB_INITDB_ROOT_USERNAME=api-platform
56
56
# You should definitely change the password in production
57
-
- MONGO_INITDB_ROOT_PASSWORD=!ChangeMe!
57
+
- MONGODB_INITDB_ROOT_PASSWORD=!ChangeMe!
58
58
volumes:
59
59
- db-data:/data/db:rw
60
60
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
@@ -64,11 +64,10 @@ services:
64
64
# ...
65
65
```
66
66
67
-
In all cases, enable the MongoDB support by requiring the [Doctrine MongoDB ODM bundle](https://github.com/doctrine/DoctrineMongoDBBundle)
68
-
package using Composer:
67
+
In all cases, enable the MongoDB support by requiring the [Doctrine MongoDB ODM bundle](https://github.com/doctrine/DoctrineMongoDBBundle) and [MongoDB ODM for API Platform](https://github.com/api-platform/doctrine-odm/) packages using Composer:
0 commit comments