1 | version: '3'
|
2 |
|
3 | services:
|
4 | mssql:
|
5 | image: mcr.microsoft.com/mssql/server:2017-latest
|
6 | ports:
|
7 | - '21433:1433'
|
8 | environment:
|
9 | - ACCEPT_EULA=Y
|
10 | - SA_PASSWORD=S0meVeryHardPassword
|
11 | healthcheck:
|
12 | test: /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P 'S0meVeryHardPassword' -Q 'select 1'
|
13 | initmssqlknexdb:
|
14 | image: mcr.microsoft.com/mssql/server:2017-latest
|
15 | links:
|
16 | - mssql
|
17 | depends_on:
|
18 | - mssql
|
19 | entrypoint:
|
20 | - bash
|
21 | - -c
|
22 |
|
23 | - 'until /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P S0meVeryHardPassword -d master -Q "CREATE DATABASE knex_test; ALTER DATABASE knex_test SET DELAYED_DURABILITY = FORCED"; do sleep 5; done'
|
24 |
|
25 | mysql:
|
26 | image: mysql
|
27 |
|
28 |
|
29 |
|
30 | command: --default-authentication-plugin=mysql_native_password --sync_binlog=0 --innodb_doublewrite=OFF --innodb-flush-log-at-trx-commit=0 --innodb-flush-method=nosync
|
31 | ports:
|
32 | - '23306:3306'
|
33 | environment:
|
34 | - MYSQL_ROOT_PASSWORD=testrootpassword
|
35 | - MYSQL_DATABASE=knex_test
|
36 | - MYSQL_USER=testuser
|
37 | - MYSQL_PASSWORD=testpassword
|
38 | healthcheck:
|
39 | test:
|
40 | [
|
41 | 'CMD',
|
42 | '/usr/bin/mysql',
|
43 | '-hlocalhost',
|
44 | '-utestuser',
|
45 | '-ptestpassword',
|
46 | '-e',
|
47 | 'SELECT 1',
|
48 | ]
|
49 | interval: 30s
|
50 | timeout: 5s
|
51 | retries: 3
|
52 | restart: always
|
53 | volumes:
|
54 | - mysql_data:/var/lib/mysql
|
55 | waitmysql:
|
56 | image: mysql
|
57 | links:
|
58 | - mysql
|
59 | depends_on:
|
60 | - mysql
|
61 | entrypoint:
|
62 | - bash
|
63 | - -c
|
64 | - 'until /usr/bin/mysql -hmysql -utestuser -ptestpassword -e "SELECT 1"; do sleep 5; done'
|
65 |
|
66 | postgres:
|
67 | image: postgres:alpine
|
68 |
|
69 | command: '-c full_page_writes=off -c fsync=off -c synchronous_commit=off'
|
70 | ports:
|
71 | - '25432:5432'
|
72 | environment:
|
73 | - POSTGRES_USER=testuser
|
74 | - POSTGRES_PASSWORD=knextest
|
75 | - POSTGRES_DB=knex_test
|
76 | waitpostgres:
|
77 | image: postgres:alpine
|
78 | links:
|
79 | - postgres
|
80 | depends_on:
|
81 | - postgres
|
82 | entrypoint:
|
83 | - bash
|
84 | - -c
|
85 | - 'until /usr/local/bin/psql postgres://testuser:knextest@postgres/knex_test -c "SELECT 1"; do sleep 5; done'
|
86 |
|
87 | oracledbxe:
|
88 | image: quillbuilduser/oracle-18-xe
|
89 | container_name: oracledbxe_container
|
90 | ports:
|
91 | - '21521:1521'
|
92 | environment:
|
93 | - ORACLE_ALLOW_REMOTE=true
|
94 | waitoracledbxe:
|
95 | image: quillbuilduser/oracle-18-xe
|
96 | links:
|
97 | - oracledbxe
|
98 | depends_on:
|
99 | - oracledbxe
|
100 | environment:
|
101 | - ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
|
102 | entrypoint:
|
103 | - bash
|
104 | - -c
|
105 | - 'until /opt/oracle/product/18c/dbhomeXE/bin/sqlplus -s sys/Oracle18@oracledbxe/XE as sysdba <<< "SELECT 13376411 FROM DUAL; exit;" | grep "13376411"; do echo "Could not connect to oracle... sleep for a while"; sleep 5; done'
|
106 |
|
107 | volumes:
|
108 | mysql_data:
|
109 | driver_opts:
|
110 | type: tmpfs
|
111 | device: tmpfs
|