Skip to content

Commit ad93c11

Browse files
dunglasfabpot
authored andcommitted
[doctrine-bundle] Docker support
1 parent af59c6f commit ad93c11

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

doctrine/doctrine-bundle/1.6/manifest.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,28 @@
1010
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
1111
"#2": "For an SQLite database, use: \"sqlite:///%kernel.project_dir%/var/data.db\"",
1212
"#3": "For a PostgreSQL database, use: \"postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8\"",
13-
"#4": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
13+
"#4": "For the Docker integration, use: \"mysql://symfony:ChangeMe@db:3306/app?serverVersion=mariadb-10.5\"",
14+
"#5": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
1415
"DATABASE_URL": "mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
16+
},
17+
"dockerfile": ["RUN docker-php-ext-install pdo_mysql"],
18+
"docker-compose": {
19+
"services": [
20+
"db:",
21+
" image: mariadb:10.4",
22+
" environment:",
23+
" - MYSQL_DATABASE=app",
24+
" # You should definitely change the password in production",
25+
" - MYSQL_PASSWORD=ChangeMe",
26+
" - MYSQL_RANDOM_ROOT_PASSWORD=true",
27+
" - MYSQL_USER=symfony",
28+
" volumes:",
29+
" - db-data:/var/lib/mysql:rw",
30+
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
31+
" # - ./docker/db/data:/var/lib/mysql:rw",
32+
" ports:",
33+
" - \"3306\""
34+
],
35+
"volumes": ["db-data: {}"]
1536
}
1637
}

0 commit comments

Comments
 (0)