mirror of
https://github.com/symfony/recipes.git
synced 2026-03-23 23:32:10 +01:00
Make doctrine/mongodb-odm-bundle an official recipe (#1509)
* Import doctrine/mongodb-odm-bundle recipes from contrib * Add alias 'mongodb-odm' for 'doctrine/mongodb-odm-bundle' * No need to resolve MONGODB_URL env var
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: true
|
||||
auto_generate_hydrator_classes: true
|
||||
connections:
|
||||
default:
|
||||
server: '%env(MONGODB_URI)%'
|
||||
options: {}
|
||||
default_database: '%env(MONGODB_DB)%'
|
||||
document_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
dir: '%kernel.project_dir%/src/Document'
|
||||
prefix: 'App\Document'
|
||||
alias: App
|
||||
@@ -0,0 +1,21 @@
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: false
|
||||
auto_generate_hydrator_classes: false
|
||||
document_managers:
|
||||
default:
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine_mongodb.system_cache_provider
|
||||
|
||||
services:
|
||||
doctrine_mongodb.system_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine_mongodb.system_cache_pool'
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine_mongodb.system_cache_pool:
|
||||
adapter: cache.system
|
||||
14
doctrine/mongodb-odm-bundle/3.3/manifest.json
Normal file
14
doctrine/mongodb-odm-bundle/3.3/manifest.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Doctrine\\Bundle\\MongoDBBundle\\DoctrineMongoDBBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"MONGODB_URI": "mongodb://localhost:27017",
|
||||
"MONGODB_DB": "symfony"
|
||||
},
|
||||
"aliases": ["mongodb-odm", "doctrine-mongodb", "mongo-odm", "doctrine-mongo"]
|
||||
}
|
||||
0
doctrine/mongodb-odm-bundle/3.3/src/Document/.gitignore
vendored
Normal file
0
doctrine/mongodb-odm-bundle/3.3/src/Document/.gitignore
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: true
|
||||
auto_generate_hydrator_classes: true
|
||||
connections:
|
||||
default:
|
||||
server: '%env(MONGODB_URI)%'
|
||||
options: {}
|
||||
default_database: '%env(MONGODB_DB)%'
|
||||
document_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
dir: '%kernel.project_dir%/src/Document'
|
||||
prefix: 'App\Document'
|
||||
alias: App
|
||||
|
||||
when@prod:
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: false
|
||||
auto_generate_hydrator_classes: false
|
||||
document_managers:
|
||||
default:
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine_mongodb.system_cache_provider
|
||||
|
||||
services:
|
||||
doctrine_mongodb.system_cache_provider:
|
||||
factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap']
|
||||
class: 'Doctrine\Common\Cache\Psr6\DoctrineProvider'
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine_mongodb.system_cache_pool'
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine_mongodb.system_cache_pool:
|
||||
adapter: cache.system
|
||||
18
doctrine/mongodb-odm-bundle/4.1/manifest.json
Normal file
18
doctrine/mongodb-odm-bundle/4.1/manifest.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Doctrine\\Bundle\\MongoDBBundle\\DoctrineMongoDBBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"MONGODB_URI": "mongodb://localhost:27017",
|
||||
"MONGODB_DB": "symfony"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/cache": "<1.11",
|
||||
"symfony/framework-bundle": "<5.3"
|
||||
},
|
||||
"aliases": ["mongodb-odm", "doctrine-mongodb", "mongo-odm", "doctrine-mongo"]
|
||||
}
|
||||
0
doctrine/mongodb-odm-bundle/4.1/src/Document/.gitignore
vendored
Normal file
0
doctrine/mongodb-odm-bundle/4.1/src/Document/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: true
|
||||
auto_generate_hydrator_classes: true
|
||||
connections:
|
||||
default:
|
||||
server: '%env(MONGODB_URI)%'
|
||||
options: {}
|
||||
default_database: '%env(MONGODB_DB)%'
|
||||
document_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
dir: '%kernel.project_dir%/src/Document'
|
||||
prefix: 'App\Document'
|
||||
alias: App
|
||||
|
||||
when@prod:
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: false
|
||||
auto_generate_hydrator_classes: false
|
||||
document_managers:
|
||||
default:
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine_mongodb.system_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine_mongodb.system_cache_pool:
|
||||
adapter: cache.system
|
||||
46
doctrine/mongodb-odm-bundle/4.4/manifest.json
Normal file
46
doctrine/mongodb-odm-bundle/4.4/manifest.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Doctrine\\Bundle\\MongoDBBundle\\DoctrineMongoDBBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"#1": "Format described at https://www.mongodb.com/docs/php-library/current/connect/connection-options/",
|
||||
"#2": "MONGODB_URI=\"mongodb://username:password@localhost:27017/?authSource=auth-db\"",
|
||||
"#3": "MONGODB_URI=\"mongodb+srv://username:password@YOUR_CLUSTER_NAME.YOUR_HASH.mongodb.net/?retryWrites=true&w=majority\"",
|
||||
"MONGODB_URI": "mongodb://localhost:27017",
|
||||
"MONGODB_DB": "symfony"
|
||||
},
|
||||
"dockerfile": [
|
||||
"RUN install-php-extensions mongodb"
|
||||
],
|
||||
"docker-compose": {
|
||||
"compose.yaml": {
|
||||
"services": [
|
||||
"mongodb:",
|
||||
" # In production, you may want to use a managed database service",
|
||||
" image: mongodb/mongodb-community-server:latest",
|
||||
" environment:",
|
||||
" - MONGODB_INITDB_DATABASE=${MONGODB_DB:-app}",
|
||||
" # You should definitely set a root username and password in production",
|
||||
" - MONGODB_INITDB_ROOT_USERNAME=${MONGODB_USERNAME:-}",
|
||||
" - MONGODB_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD:-}",
|
||||
" volumes:",
|
||||
" - mongodb_data:/data/db:rw",
|
||||
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
|
||||
" # - ./docker/mongodb/data:/data/db:rw"
|
||||
],
|
||||
"volumes": ["mongodb_data:"]
|
||||
},
|
||||
"compose.override.yaml": {
|
||||
"services": [
|
||||
"mongodb:",
|
||||
" ports:",
|
||||
" - \"27017\""
|
||||
]
|
||||
}
|
||||
},
|
||||
"aliases": ["mongodb-odm", "doctrine-mongodb", "mongo-odm", "doctrine-mongo"]
|
||||
}
|
||||
0
doctrine/mongodb-odm-bundle/4.4/src/Document/.gitignore
vendored
Normal file
0
doctrine/mongodb-odm-bundle/4.4/src/Document/.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: true
|
||||
auto_generate_hydrator_classes: true
|
||||
connections:
|
||||
default:
|
||||
server: '%env(MONGODB_URI)%'
|
||||
options: {}
|
||||
default_database: '%env(MONGODB_DB)%'
|
||||
document_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
dir: '%kernel.project_dir%/src/Document'
|
||||
prefix: 'App\Document'
|
||||
|
||||
when@prod:
|
||||
doctrine_mongodb:
|
||||
auto_generate_proxy_classes: false
|
||||
auto_generate_hydrator_classes: false
|
||||
document_managers:
|
||||
default:
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine_mongodb.system_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine_mongodb.system_cache_pool:
|
||||
adapter: cache.system
|
||||
46
doctrine/mongodb-odm-bundle/5.0/manifest.json
Normal file
46
doctrine/mongodb-odm-bundle/5.0/manifest.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"bundles": {
|
||||
"Doctrine\\Bundle\\MongoDBBundle\\DoctrineMongoDBBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"env": {
|
||||
"#1": "Format described at https://www.mongodb.com/docs/php-library/current/connect/connection-options/",
|
||||
"#2": "MONGODB_URI=\"mongodb://username:password@localhost:27017/?authSource=auth-db\"",
|
||||
"#3": "MONGODB_URI=\"mongodb+srv://username:password@YOUR_CLUSTER_NAME.YOUR_HASH.mongodb.net/?retryWrites=true&w=majority\"",
|
||||
"MONGODB_URI": "mongodb://localhost:27017",
|
||||
"MONGODB_DB": "symfony"
|
||||
},
|
||||
"dockerfile": [
|
||||
"RUN install-php-extensions mongodb"
|
||||
],
|
||||
"docker-compose": {
|
||||
"compose.yaml": {
|
||||
"services": [
|
||||
"mongodb:",
|
||||
" # In production, you may want to use a managed database service",
|
||||
" image: mongodb/mongodb-atlas-local:latest",
|
||||
" environment:",
|
||||
" - MONGODB_INITDB_DATABASE=${MONGODB_DB:-app}",
|
||||
" # You should definitely set a root username and password in production",
|
||||
" - MONGODB_INITDB_ROOT_USERNAME=${MONGODB_USERNAME:-}",
|
||||
" - MONGODB_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD:-}",
|
||||
" volumes:",
|
||||
" - mongodb_data:/data/db:rw",
|
||||
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
|
||||
" # - ./docker/mongodb/data:/data/db:rw"
|
||||
],
|
||||
"volumes": ["mongodb_data:"]
|
||||
},
|
||||
"compose.override.yaml": {
|
||||
"services": [
|
||||
"mongodb:",
|
||||
" ports:",
|
||||
" - \"27017\""
|
||||
]
|
||||
}
|
||||
},
|
||||
"aliases": ["mongodb-odm", "doctrine-mongodb", "mongo-odm", "doctrine-mongo"]
|
||||
}
|
||||
0
doctrine/mongodb-odm-bundle/5.0/src/Document/.gitignore
vendored
Normal file
0
doctrine/mongodb-odm-bundle/5.0/src/Document/.gitignore
vendored
Normal file
Reference in New Issue
Block a user