2019-05-13 12:21:36 +03:00
version : '3'
services :
mssql :
2021-10-28 00:10:33 +03:00
image : mcr.microsoft.com/mssql/server:2019-latest
2019-05-13 12:21:36 +03:00
ports :
- '21433:1433'
environment :
- ACCEPT_EULA=Y
- SA_PASSWORD=S0meVeryHardPassword
healthcheck :
test : /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P 'S0meVeryHardPassword' -Q 'select 1'
2020-12-22 10:28:58 +02:00
waitmssql :
2020-03-07 00:25:54 +03:00
image : mcr.microsoft.com/mssql/server:2017-latest
2019-05-13 12:21:36 +03:00
links :
- mssql
depends_on :
- mssql
entrypoint :
- bash
- -c
2020-03-07 00:25:54 +03:00
# https://docs.microsoft.com/en-us/sql/relational-databases/logs/control-transaction-durability?view=sql-server-ver15#bkmk_DbControl
2020-12-30 16:13:35 +00:00
- 'until /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P S0meVeryHardPassword -d master -Q "CREATE DATABASE knex_test; ALTER DATABASE knex_test SET ALLOW_SNAPSHOT_ISOLATION ON; ALTER DATABASE knex_test SET DELAYED_DURABILITY = FORCED"; do sleep 5; done'
2019-05-13 12:21:36 +03:00
mysql :
2025-01-05 19:29:24 +02:00
image : mysql:8.0.40
2020-03-07 00:25:54 +03:00
# https://dev.mysql.com/doc/refman/8.0/en/mysql-acid.html
# https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_method
# nosync only for unix, edit for local start on other systems
command : --default-authentication-plugin=mysql_native_password --sync_binlog=0 --innodb_doublewrite=OFF --innodb-flush-log-at-trx-commit=0 --innodb-flush-method=nosync
2019-05-13 12:21:36 +03:00
ports :
- '23306:3306'
environment :
- MYSQL_ROOT_PASSWORD=testrootpassword
- MYSQL_DATABASE=knex_test
- MYSQL_USER=testuser
- MYSQL_PASSWORD=testpassword
healthcheck :
test :
[
'CMD' ,
'/usr/bin/mysql' ,
'-hlocalhost' ,
'-utestuser' ,
'-ptestpassword' ,
'-e' ,
'SELECT 1' ,
]
interval : 30s
timeout : 5s
retries : 3
restart : always
2020-03-07 00:25:54 +03:00
volumes :
- mysql_data:/var/lib/mysql
2019-05-13 12:21:36 +03:00
waitmysql :
2025-01-05 19:29:24 +02:00
image : mysql:8.0.40
2019-05-13 12:21:36 +03:00
links :
- mysql
depends_on :
- mysql
entrypoint :
- bash
- -c
- 'until /usr/bin/mysql -hmysql -utestuser -ptestpassword -e "SELECT 1"; do sleep 5; done'
postgres :
2021-10-02 16:55:06 +03:00
image : postgres:13-alpine
2020-03-07 00:25:54 +03:00
# see https://www.postgresql.org/docs/current/non-durability.html
command : '-c full_page_writes=off -c fsync=off -c synchronous_commit=off'
2019-05-13 12:21:36 +03:00
ports :
- '25432:5432'
environment :
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=knextest
- POSTGRES_DB=knex_test
waitpostgres :
2021-10-02 16:55:06 +03:00
image : postgres:13-alpine
2019-05-13 12:21:36 +03:00
links :
- postgres
depends_on :
- postgres
entrypoint :
- bash
- -c
- 'until /usr/local/bin/psql postgres://testuser:knextest@postgres/knex_test -c "SELECT 1"; do sleep 5; done'
2021-10-02 23:45:17 +03:00
cockroachdb :
2022-01-06 14:44:16 +01:00
image : cockroachdb/cockroach:latest-v21.2
2021-10-02 23:45:17 +03:00
container_name : crdb
hostname : crdb
command : start-single-node --cluster-name=example-single-node --insecure
ports :
2023-07-12 21:42:57 +01:00
- '26257:26257'
- '8080:8080'
2021-10-02 23:45:17 +03:00
waitcockroachdb :
container_name : crdb-init
hostname : crdb-init
image : timveil/cockroachdb-remote-client:latest
environment :
- COCKROACH_HOST=crdb:26257
- COCKROACH_INSECURE=true
- DATABASE_NAME=test
depends_on :
- cockroachdb
2021-09-06 09:04:23 -04:00
pgnative :
2021-10-02 16:55:06 +03:00
image : postgres:13-alpine
2021-09-06 09:04:23 -04:00
# see https://www.postgresql.org/docs/current/non-durability.html
command : '-c full_page_writes=off -c fsync=off -c synchronous_commit=off'
ports :
- '25433:5432'
environment :
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=knextest
- POSTGRES_DB=knex_test
waitpgnative :
2021-10-02 16:55:06 +03:00
image : postgres:13-alpine
2021-09-06 09:04:23 -04:00
links :
- pgnative
depends_on :
- pgnative
entrypoint :
- bash
- -c
- 'until /usr/local/bin/psql postgres://testuser:knextest@pgnative/knex_test -c "SELECT 1"; do sleep 5; done'
2021-12-15 07:57:23 -05:00
oracledb :
2019-05-13 12:21:36 +03:00
image : quillbuilduser/oracle-18-xe
2021-12-15 07:57:23 -05:00
container_name : oracledb_container
2019-05-13 12:21:36 +03:00
ports :
- '21521:1521'
environment :
- ORACLE_ALLOW_REMOTE=true
2021-12-15 07:57:23 -05:00
waitoracledb :
2019-05-13 12:21:36 +03:00
image : quillbuilduser/oracle-18-xe
links :
2021-12-15 07:57:23 -05:00
- oracledb
2019-05-13 12:21:36 +03:00
depends_on :
2021-12-15 07:57:23 -05:00
- oracledb
2019-05-13 12:21:36 +03:00
environment :
- ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
entrypoint :
- bash
- -c
2021-12-15 07:57:23 -05:00
- 'until /opt/oracle/product/18c/dbhomeXE/bin/sqlplus -s sys/Oracle18@oracledb/XE as sysdba <<< "SELECT 13376411 FROM DUAL; exit;" | grep "13376411"; do echo "Could not connect to oracle... sleep for a while"; sleep 5; done'
2020-03-07 00:25:54 +03:00
volumes :
mysql_data :
driver_opts :
type : tmpfs
device : tmpfs