-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-db.yml
More file actions
130 lines (122 loc) · 3.39 KB
/
Copy pathdocker-compose-db.yml
File metadata and controls
130 lines (122 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: '3.8'
services:
postgresql:
image: postgres:18.1
container_name: postgresql
volumes:
- ${CI_PROJECT_DIR}/configs/postre-db/01-schema.sql:/docker-entrypoint-initdb.d/01-dump.sql
# better move to .env
environment:
- TZ=Europe/Kyiv
- POSTGRES_USER=alex
- POSTGRES_PASSWORD=12345
- POSTGRES_DB=public
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "public"]
interval: 10s
timeout: 5s
retries: 5
mssql:
#image: bitwarden/mssql:2022.11.1
image: mcr.microsoft.com/mssql/server:2025-RC1-ubuntu-24.04
container_name: mssql
# init db can be created by the DockerFile,
# but good practice is real migrations
# or test-helper prescript
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=mssql_pass1234567
- MSSQL_PID=Developer
ports:
- "1433:1433"
healthcheck:
test:
[
"CMD-SHELL",
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"SELECT 1\" -b -o /dev/null || exit 1"
]
interval: 10s
timeout: 5s
retries: 5
#TODO update to 23+ but it will be slower!!
oracle:
image: gvenzl/oracle-xe:21.3.0-slim
container_name: oracle
volumes:
- ${CI_PROJECT_DIR}/configs/oracle-db/01-oracle-schema.sql:/container-entrypoint-initdb.d/01-dump.sql
environment:
- TZ=Europe/Kyiv
- ORACLE_PASSWORD=Oracle_secret1
ports:
- "1521:1521"
healthcheck:
test: [ "CMD-SHELL", "healthcheck.sh" ]
interval: 10s
timeout: 5s
retries: 10
mysql:
image: mysql:8.4.11
container_name: mysql
volumes:
- ./configs/mysql-db/01-mysql-schema.sql:/docker-entrypoint-initdb.d/01-dump.sql
environment:
TZ: "Europe/Kiev"
MYSQL_ROOT_PASSWORD: ''
MYSQL_DATABASE: MYSQL_SCHEMA
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: mysql_user
MYSQL_PASSWORD: mysql_pass
ports:
- "3308:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-p$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
clickhouse:
image: clickhouse/clickhouse-server:26.2
container_name: clickhouse
ports:
- "8123:8123" # HTTP interface
- "19000:9000" # Native client
#- "9004:9004" # MySQL protocol
volumes:
# dump
- ./configs/clickhouse/dump:/docker-entrypoint-initdb.d
environment:
CLICKHOUSE_DB: myschema
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: password
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://localhost:8123/ping | grep -q Ok." ]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
autotest-example:
container_name: autotest-example
image: gradle:8.14.2-jdk17
working_dir: /app
environment:
- TZ=Europe/Kyiv
- JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
- JAVA_TOOL_OPTIONS=-DbugreaperEnv=ci
volumes:
- ${CI_PROJECT_DIR}:/app
depends_on:
postgresql:
condition: service_healthy
mssql:
condition: service_healthy
oracle:
condition: service_healthy
mysql:
condition: service_healthy
command: sh -c "gradle clean :java-test-db:test"