-
-
Notifications
You must be signed in to change notification settings - Fork 496
add support for override_url #900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
doctrine/doctrine-bundle/2.3/config/packages/doctrine.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
doctrine: | ||
dbal: | ||
override_url: true | ||
url: '%env(resolve:DATABASE_URL)%' | ||
|
||
# IMPORTANT: You MUST configure your server version, | ||
# either here or in the DATABASE_URL env var (see .env file) | ||
#server_version: '13' | ||
orm: | ||
auto_generate_proxy_classes: true | ||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware | ||
auto_mapping: true | ||
mappings: | ||
App: | ||
is_bundle: false | ||
type: annotation | ||
dir: '%kernel.project_dir%/src/Entity' | ||
prefix: 'App\Entity' | ||
alias: App | ||
Nyholm marked this conversation as resolved.
Show resolved
Hide resolved
|
20 changes: 20 additions & 0 deletions
20
doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
doctrine: | ||
orm: | ||
auto_generate_proxy_classes: false | ||
metadata_cache_driver: | ||
type: pool | ||
pool: doctrine.system_cache_pool | ||
query_cache_driver: | ||
type: pool | ||
pool: doctrine.system_cache_pool | ||
result_cache_driver: | ||
type: pool | ||
pool: doctrine.result_cache_pool | ||
|
||
framework: | ||
cache: | ||
pools: | ||
doctrine.result_cache_pool: | ||
adapter: cache.app | ||
doctrine.system_cache_pool: | ||
adapter: cache.system |
7 changes: 7 additions & 0 deletions
7
doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#doctrine: | ||
# dbal: | ||
# # Overrides the database name in the test environment only | ||
# # "host", "port", "username", & "password" can also be set to override their respective url parts | ||
# # | ||
# # If you're using ParaTest, "TEST_TOKEN" is set by ParaTest otherwise nothing is appended to the database name. | ||
# dbname: main_test%env(default::TEST_TOKEN)% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"bundles": { | ||
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/", | ||
"src/": "%SRC_DIR%/" | ||
}, | ||
"env": { | ||
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url", | ||
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", | ||
"#3": "", | ||
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"", | ||
"#5": "DATABASE_URL=\"mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7\"", | ||
"DATABASE_URL": "postgresql://db_user:[email protected]:5432/db_name?serverVersion=13&charset=utf8" | ||
}, | ||
"dockerfile": [ | ||
"RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \\", | ||
"\tdocker-php-ext-install -j$(nproc) pdo_pgsql; \\", | ||
"\tapk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \\", | ||
"\tapk del .pgsql-deps" | ||
], | ||
"docker-compose": { | ||
"docker-compose.yml": { | ||
"services": [ | ||
"database:", | ||
" image: postgres:${POSTGRES_VERSION:-13}-alpine", | ||
" environment:", | ||
" POSTGRES_DB: ${POSTGRES_DB:-app}", | ||
" # You should definitely change the password in production", | ||
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe}", | ||
" POSTGRES_USER: ${POSTGRES_USER:-symfony}", | ||
" volumes:", | ||
" - db-data:/var/lib/postgresql/data: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/db/data:/var/lib/postgresql/data:rw" | ||
], | ||
"volumes": ["db-data:"] | ||
}, | ||
"docker-compose.override.yml": { | ||
"services": [ | ||
"database:", | ||
" ports:", | ||
" - \"5432\"" | ||
] | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<bg=blue;fg=white> </> | ||
<bg=blue;fg=white> Database Configuration </> | ||
<bg=blue;fg=white> </> | ||
|
||
* Modify your DATABASE_URL config in <fg=green>.env</> | ||
|
||
* Configure the <fg=green>driver</> (postgresql) and | ||
<fg=green>server_version</> (13) in <fg=green>config/packages/doctrine.yaml</> |
Empty file.
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.