mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
b8d7c6039b
Alpine is often slower than Debian (because musl is sometimes slower than glibc) and not how anyone actually deploys PostgreSQL in production. Most notably, some floating-point computations result in slightly different values, and Debian ships with better support for different locales so sorting text (e.g. with `ORDER BY`) behaves differently. Let's test against an environment that people are likely to actually use. As a result, there are slight changes to the results of PostGIS computations in a couple of test cases. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10942 GitOrigin-RevId: 4caed19def23a372fc3930c409514b1c9b385026
187 lines
5.1 KiB
YAML
187 lines
5.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgis/postgis:16-3.4
|
|
platform: linux/amd64
|
|
command:
|
|
- -F # turn fsync off for speed
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
|
ports:
|
|
- 5432
|
|
environment:
|
|
POSTGRES_PASSWORD: "password" # you probably want to override this
|
|
volumes:
|
|
- /var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
# setup for read replicas
|
|
postgresql-primary:
|
|
image: 'bitnami/postgresql:16'
|
|
ports:
|
|
- 5432
|
|
volumes:
|
|
- '/bitnami/postgresql'
|
|
environment:
|
|
- POSTGRESQL_REPLICATION_MODE=master
|
|
- POSTGRESQL_REPLICATION_USER=repl_user
|
|
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
|
|
- POSTGRESQL_USERNAME=hasura
|
|
- POSTGRESQL_PASSWORD=hasura
|
|
- POSTGRESQL_DATABASE=hasura
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
|
|
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
postgresql-replica-1:
|
|
image: 'bitnami/postgresql:16'
|
|
ports:
|
|
- 5432
|
|
depends_on:
|
|
postgresql-primary:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRESQL_REPLICATION_MODE=slave
|
|
- POSTGRESQL_REPLICATION_USER=repl_user
|
|
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
|
|
- POSTGRESQL_MASTER_HOST=postgresql-primary
|
|
- POSTGRESQL_USERNAME=hasura
|
|
- POSTGRESQL_PASSWORD=hasura
|
|
- POSTGRESQL_MASTER_PORT_NUMBER=5432
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
|
|
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
postgresql-replica-2:
|
|
image: 'bitnami/postgresql:16'
|
|
ports:
|
|
- 5432
|
|
depends_on:
|
|
postgresql-primary:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRESQL_REPLICATION_MODE=slave
|
|
- POSTGRESQL_REPLICATION_USER=repl_user
|
|
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
|
|
- POSTGRESQL_MASTER_HOST=postgresql-primary
|
|
- POSTGRESQL_USERNAME=hasura
|
|
- POSTGRESQL_PASSWORD=hasura
|
|
- POSTGRESQL_MASTER_PORT_NUMBER=5432
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- export PGPASSWORD="$${POSTGRESQL_PASSWORD:-password}"
|
|
- psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRESQL_USERNAME:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
citus:
|
|
image: citusdata/citus:11.3.0
|
|
platform: linux/amd64
|
|
command:
|
|
- -F # turn fsync off for speed
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
|
- "-cclient_min_messages=error"
|
|
ports:
|
|
- 5432
|
|
environment:
|
|
POSTGRES_PASSWORD: "password" # you probably want to override this
|
|
volumes:
|
|
- /var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
cockroach:
|
|
image: cockroachdb/cockroach:latest-v22.2
|
|
command:
|
|
- start-single-node
|
|
- --insecure
|
|
- --accept-sql-without-tls
|
|
init: true # doesn't shut down properly without this
|
|
ports:
|
|
- 26257
|
|
volumes:
|
|
- /cockroach/cockroach-data
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- cockroach sql --insecure --execute "select 1;"
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
yugabyte:
|
|
image: yugabytedb/yugabyte
|
|
command:
|
|
- bin/yugabyted
|
|
- start
|
|
- --daemon=false
|
|
- --initial_scripts_dir=/
|
|
ports:
|
|
- "65009:5433"
|
|
environment:
|
|
YSQL_USER: "hasura"
|
|
YSQL_PASSWORD: "hasura"
|
|
YSQL_DB: "hasura"
|
|
volumes:
|
|
- /var/lib/postgresql/data
|
|
|
|
sqlserver:
|
|
image: mcr.microsoft.com/mssql/server:2019-latest
|
|
platform: linux/amd64
|
|
ports:
|
|
- 1433
|
|
environment:
|
|
ACCEPT_EULA: "Y"
|
|
SA_PASSWORD: "Password!"
|
|
MSSQL_SA_PASSWORD: "Password!"
|
|
volumes:
|
|
- /var/opt/mssql
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- |
|
|
/opt/mssql-tools/bin/sqlcmd -U SA -P "$$SA_PASSWORD"
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
mysql:
|
|
image: mysql
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
restart: always
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: Password123#
|
|
ports:
|
|
- "3306:3306"
|