2021-11-23 21:15:17 +03:00
|
|
|
# This file starts up the necessary database services to test
|
|
|
|
# graphql-engine.
|
|
|
|
#
|
|
|
|
# Run the following to get started:
|
|
|
|
#
|
2022-08-02 13:29:44 +03:00
|
|
|
# docker compose up -d
|
2021-11-23 21:15:17 +03:00
|
|
|
#
|
|
|
|
# That will start up services in the background. To take them down,
|
|
|
|
# you have to run
|
|
|
|
#
|
2022-08-02 13:29:44 +03:00
|
|
|
# docker compose down
|
2021-11-23 21:15:17 +03:00
|
|
|
#
|
|
|
|
# If you changed DB init scripts, then you should also run:
|
|
|
|
#
|
2022-08-02 13:29:44 +03:00
|
|
|
# docker compose down --volumes
|
2021-11-23 21:15:17 +03:00
|
|
|
#
|
|
|
|
# That'll delete the volumes. Otherwise e.g. PostgreSQL will skip
|
|
|
|
# initializing if a DB already exists.
|
|
|
|
#
|
|
|
|
# If you omit -d, it'll run them all in the foreground, then you can
|
|
|
|
# stop them with your usual control-C terminal command.
|
|
|
|
#
|
|
|
|
# Facts:
|
|
|
|
#
|
|
|
|
# * The SERVICE PORTS numbering start at 65001, 65002, etc. to avoid
|
|
|
|
# bother existing instances of databases.
|
|
|
|
#
|
|
|
|
# * The login credentials are, where possible, all "hasura" to avoid
|
|
|
|
# unnecessary mental overhead.
|
|
|
|
|
2022-08-04 13:08:54 +03:00
|
|
|
version: "3.6"
|
2021-11-23 21:15:17 +03:00
|
|
|
|
2022-08-04 13:08:54 +03:00
|
|
|
services:
|
2021-11-23 21:15:17 +03:00
|
|
|
mariadb:
|
|
|
|
image: mariadb:10.6.4-focal@sha256:c014ba1efc5dbd711d0520c7762d57807f35549de3414eb31e942a420c8a2ed2
|
|
|
|
ports:
|
|
|
|
- "65001:3306"
|
|
|
|
environment:
|
|
|
|
MARIADB_USER: "hasura"
|
|
|
|
MARIADB_PASSWORD: "hasura"
|
|
|
|
MARIADB_DATABASE: "hasura"
|
|
|
|
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "true"
|
2022-08-04 13:08:54 +03:00
|
|
|
volumes:
|
|
|
|
- mariadb-data:/var/lib/mysql
|
2021-11-23 21:15:17 +03:00
|
|
|
|
|
|
|
postgres:
|
2022-10-06 12:44:49 +03:00
|
|
|
image: postgis/postgis:15beta4-3.3-alpine
|
2022-09-15 17:02:02 +03:00
|
|
|
command:
|
|
|
|
- -F # turn fsync off for speed
|
|
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
2021-11-23 21:15:17 +03:00
|
|
|
ports:
|
|
|
|
- "65002:5432"
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: "hasura"
|
|
|
|
POSTGRES_PASSWORD: "hasura"
|
|
|
|
POSTGRES_DB: "hasura"
|
|
|
|
volumes:
|
2022-09-15 17:02:02 +03:00
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
- ./docker-compose/postgres/init.sh:/docker-entrypoint-initdb.d/init-hasura.sh:ro
|
2021-12-30 14:00:52 +03:00
|
|
|
|
|
|
|
sqlserver:
|
2022-10-06 18:48:51 +03:00
|
|
|
image: ${MSSQL_IMAGE:-mcr.microsoft.com/mssql/server:2019-latest}
|
2021-12-30 14:00:52 +03:00
|
|
|
ports:
|
|
|
|
- "65003:1433"
|
|
|
|
environment:
|
|
|
|
ACCEPT_EULA: "Y"
|
|
|
|
SA_PASSWORD: "DockerComposePassword!"
|
2022-01-21 10:48:27 +03:00
|
|
|
MSSQL_SA_PASSWORD: "DockerComposePassword!"
|
2022-08-04 13:08:54 +03:00
|
|
|
volumes:
|
|
|
|
- mssql-data:/var/opt/mssql
|
2021-12-30 14:00:52 +03:00
|
|
|
|
2022-09-21 19:47:11 +03:00
|
|
|
# Separated from the `sqlserver` container so we can use the `mssql-tools` image to run `sqlcmd`.
|
|
|
|
# `sqlcmd` is not available in the `azure-sql-edge` image on arm64, which we use for testing on macOS.
|
|
|
|
sqlserver-init:
|
|
|
|
image: mcr.microsoft.com/mssql-tools
|
|
|
|
command:
|
|
|
|
- /init.sh
|
|
|
|
environment:
|
|
|
|
SERVER_HOST: sqlserver
|
|
|
|
volumes:
|
|
|
|
- ./docker-compose/sqlserver-init/init.sh:/init.sh
|
|
|
|
- ./docker-compose/sqlserver-init/init.sql:/init.sql
|
|
|
|
|
2021-12-30 14:00:52 +03:00
|
|
|
citus:
|
|
|
|
image: citusdata/citus:10.1@sha256:7e497e5ca18d7f2ae2a66c1d5d676b548e9221b7e6294adfb03006adad85502c
|
|
|
|
ports:
|
|
|
|
- "65004:5432"
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: "hasura"
|
|
|
|
POSTGRES_PASSWORD: "hasura"
|
|
|
|
POSTGRES_DB: "hasura"
|
|
|
|
volumes:
|
2022-08-04 13:08:54 +03:00
|
|
|
- citus-data:/var/lib/postgresql/data
|
|
|
|
- ./docker-compose/postgres/init.sh:/docker-entrypoint-initdb.d/init-hasura.sh:ro
|
2022-06-23 11:07:52 +03:00
|
|
|
|
2022-08-25 20:17:28 +03:00
|
|
|
cockroach:
|
2022-10-11 14:48:24 +03:00
|
|
|
image: us-docker.pkg.dev/cockroach-cloud-images/cockroachdb/cockroach:v22.2.0-beta.2-218-ga7ecaa82cf
|
2022-08-25 20:17:28 +03:00
|
|
|
command:
|
|
|
|
- start-single-node
|
|
|
|
- --insecure
|
|
|
|
- --accept-sql-without-tls
|
|
|
|
ports:
|
|
|
|
- "65008:26257"
|
|
|
|
environment:
|
|
|
|
COCKROACH_USER: "root"
|
|
|
|
COCKROACH_DATABASE: "hasura"
|
|
|
|
volumes:
|
2022-09-15 17:02:02 +03:00
|
|
|
- cockroach-data:/cockroach/cockroach-data
|
|
|
|
- ./docker-compose/cockroach/init.sh:/docker-entrypoint-initdb.d/init-hasura.sh:ro
|
2022-08-25 20:17:28 +03:00
|
|
|
|
2022-06-23 11:07:52 +03:00
|
|
|
dc-reference-agent:
|
2022-09-05 09:08:14 +03:00
|
|
|
build:
|
|
|
|
context: ./dc-agents
|
|
|
|
dockerfile: ./Dockerfile-reference
|
2022-06-23 11:07:52 +03:00
|
|
|
ports:
|
|
|
|
- "65005:8100"
|
2022-08-04 13:08:54 +03:00
|
|
|
|
2022-08-05 10:11:15 +03:00
|
|
|
dc-sqlite-agent:
|
2022-09-05 09:08:14 +03:00
|
|
|
build:
|
|
|
|
context: ./dc-agents
|
|
|
|
dockerfile: ./Dockerfile-sqlite
|
2022-08-05 10:11:15 +03:00
|
|
|
ports:
|
2022-08-11 06:21:03 +03:00
|
|
|
- "65007:8100"
|
2022-08-05 10:11:15 +03:00
|
|
|
volumes:
|
|
|
|
- "./dc-agents/sqlite/test/db.chinook.sqlite:/db.chinook.sqlite"
|
2022-09-07 06:42:20 +03:00
|
|
|
environment:
|
2022-09-15 12:46:17 +03:00
|
|
|
METRICS: y
|
2022-09-07 06:42:20 +03:00
|
|
|
PRETTY_PRINT_LOGS: y
|
|
|
|
LOG_LEVEL: debug
|
2022-08-05 10:11:15 +03:00
|
|
|
|
2022-08-04 13:08:54 +03:00
|
|
|
volumes:
|
|
|
|
citus-data:
|
|
|
|
mariadb-data:
|
|
|
|
mssql-data:
|
|
|
|
postgres-data:
|
2022-08-25 20:17:28 +03:00
|
|
|
cockroach-data:
|