-
-
Notifications
You must be signed in to change notification settings - Fork 498
[doctrine-bundle] Docker support #113
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
Changes from all commits
ad93c11
8236313
d246d09
ade1a9c
6a91adf
c76a55f
1951e0b
f311792
9730ab4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,39 @@ | |
"env": { | ||
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url", | ||
"#2": "For an SQLite database, use: \"sqlite:///%kernel.project_dir%/var/data.db\"", | ||
"#3": "For a PostgreSQL database, use: \"postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8\"", | ||
"#3": "For a MySQL database, use: \"mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7\"", | ||
"#4": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", | ||
"DATABASE_URL": "mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" | ||
"DATABASE_URL": "postgresql://db_user:db_password@127.0.0.1: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": { | ||
dunglas marked this conversation as resolved.
Show resolved
Hide resolved
dunglas marked this conversation as resolved.
Show resolved
Hide resolved
dunglas marked this conversation as resolved.
Show resolved
Hide resolved
dunglas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"docker-compose.yml": { | ||
"services": [ | ||
"database:", | ||
" image: postgres:${POSTGRES_VERSION:-13}-alpine", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dunglas Not sure if I did already ask this 🙈 , but was there a specific reasons why this yaml files are instead of 4 spaces 2 spaces. And so are not similar to symfony config files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4 spaces are the way to go indeed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we go: #1018 :) |
||
" 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": [ | ||
"db:", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this service be named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct :) Up for a PR @pyrech? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #843 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, can you do a PR? |
||
" ports:", | ||
" - \"5432\"" | ||
] | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.