Skip to content

Commit a5f57a9

Browse files
authored
test: Add profiles to docker compose (#2503)
By default, only the PostgreSQL 15 and MySQL 8 containers will start. To start all version of MySQL and PostgreSQL, use the following command: ``` docker compose --profile mysql --profile postgres up ```
1 parent 85936d6 commit a5f57a9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docker-compose.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ services:
1919
MYSQL_DATABASE: mysql
2020
MYSQL_ROOT_PASSWORD: mysecretpassword
2121
MYSQL_ROOT_HOST: '%'
22+
profiles:
23+
- mysql
2224

2325
postgresql:
2426
image: "postgres:15"
@@ -39,6 +41,8 @@ services:
3941
POSTGRES_DB: postgres
4042
POSTGRES_PASSWORD: mysecretpassword
4143
POSTGRES_USER: postgres
44+
profiles:
45+
- postgres
4246

4347
postgresql13:
4448
image: "postgres:13"
@@ -49,6 +53,8 @@ services:
4953
POSTGRES_DB: postgres
5054
POSTGRES_PASSWORD: mysecretpassword
5155
POSTGRES_USER: postgres
56+
profiles:
57+
- postgres
5258

5359
postgresql12:
5460
image: "postgres:12"
@@ -59,6 +65,8 @@ services:
5965
POSTGRES_DB: postgres
6066
POSTGRES_PASSWORD: mysecretpassword
6167
POSTGRES_USER: postgres
68+
profiles:
69+
- postgres
6270

6371
postgresql11:
6472
image: "postgres:11"
@@ -68,4 +76,6 @@ services:
6876
environment:
6977
POSTGRES_DB: postgres
7078
POSTGRES_PASSWORD: mysecretpassword
71-
POSTGRES_USER: postgres
79+
POSTGRES_USER: postgres
80+
profiles:
81+
- postgres

0 commit comments

Comments
 (0)