don't expose the port by default (security)

This commit is contained in:
Kévin Dunglas
2020-11-17 09:40:40 +01:00
committed by Fabien Potencier
parent ad93c11c2e
commit 823631318a
+5 -4
View File
@@ -10,7 +10,7 @@
"#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\"",
"#4": "For the Docker integration, use: \"mysql://symfony:ChangeMe@db:3306/app?serverVersion=mariadb-10.5\"",
"#4": "For the Docker integration, use: \"mysql://symfony:ChangeMe@db:3306/app?serverVersion=mariadb-10.5.6\"",
"#5": "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"
},
@@ -18,7 +18,7 @@
"docker-compose": {
"services": [
"db:",
" image: mariadb:10.4",
" image: mariadb:10.5.6",
" environment:",
" - MYSQL_DATABASE=app",
" # You should definitely change the password in production",
@@ -29,8 +29,9 @@
" - db-data:/var/lib/mysql: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/mysql:rw",
" ports:",
" - \"3306\""
" # To expose the port publicly",
" # ports:",
" # - \"3306\""
],
"volumes": ["db-data: {}"]
}