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:
|
2022-11-17 16:53:04 +03:00
|
|
|
image: mariadb:10
|
2021-11-23 21:15:17 +03:00
|
|
|
ports:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- 3306
|
2021-11-23 21:15:17 +03:00
|
|
|
environment:
|
|
|
|
MARIADB_USER: "hasura"
|
|
|
|
MARIADB_PASSWORD: "hasura"
|
|
|
|
MARIADB_DATABASE: "hasura"
|
|
|
|
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "true"
|
2022-10-17 16:19:12 +03:00
|
|
|
MARIADB_MYSQL_LOCALHOST_USER: "1"
|
2022-08-04 13:08:54 +03:00
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /var/lib/mysql
|
2022-10-17 16:19:12 +03:00
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD
|
|
|
|
- /usr/local/bin/healthcheck.sh
|
|
|
|
- --connect
|
|
|
|
- --innodb_initialized
|
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
2022-11-10 13:16:17 +03:00
|
|
|
retries: 20
|
2021-11-23 21:15:17 +03:00
|
|
|
|
|
|
|
postgres:
|
2022-10-21 21:09:15 +03:00
|
|
|
image: postgis/postgis:15-3.3-alpine
|
2022-12-19 02:05:49 +03:00
|
|
|
platform: linux/amd64
|
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:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- 5432
|
2021-11-23 21:15:17 +03:00
|
|
|
environment:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
POSTGRES_PASSWORD: "password" # you probably want to override this
|
2021-11-23 21:15:17 +03:00
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /var/lib/postgresql/data
|
2022-10-17 16:19:12 +03:00
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD-SHELL
|
2022-12-21 15:32:54 +03:00
|
|
|
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
|
2022-10-17 16:19:12 +03:00
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
2022-11-10 13:16:17 +03:00
|
|
|
retries: 20
|
2021-12-30 14:00:52 +03:00
|
|
|
|
2022-11-14 15:38:19 +03:00
|
|
|
citus:
|
2022-11-17 16:53:04 +03:00
|
|
|
image: citusdata/citus:11
|
2022-12-19 02:05:49 +03:00
|
|
|
platform: linux/amd64
|
2022-11-18 14:09:04 +03:00
|
|
|
command:
|
|
|
|
- -F # turn fsync off for speed
|
|
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
|
|
|
- "-cclient_min_messages=error"
|
2022-11-14 15:38:19 +03:00
|
|
|
ports:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- 5432
|
2022-11-14 15:38:19 +03:00
|
|
|
environment:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
POSTGRES_PASSWORD: "password" # you probably want to override this
|
2022-11-14 15:38:19 +03:00
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /var/lib/postgresql/data
|
2022-11-14 15:38:19 +03:00
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD-SHELL
|
2022-12-21 15:32:54 +03:00
|
|
|
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
|
2022-11-14 15:38:19 +03:00
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 20
|
|
|
|
|
|
|
|
cockroach:
|
2022-12-19 18:32:31 +03:00
|
|
|
image: cockroachdb/cockroach:latest-v22.2
|
2022-11-14 15:38:19 +03:00
|
|
|
command:
|
|
|
|
- start-single-node
|
|
|
|
- --insecure
|
|
|
|
- --accept-sql-without-tls
|
2022-12-19 18:32:31 +03:00
|
|
|
init: true # doesn't shut down properly without this
|
2022-11-14 15:38:19 +03:00
|
|
|
ports:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- 26257
|
2022-11-14 15:38:19 +03:00
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /cockroach/cockroach-data
|
2022-11-14 15:38:19 +03:00
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD-SHELL
|
2023-03-27 16:57:36 +03:00
|
|
|
- cockroach sql --insecure --execute "select 1;"
|
2022-11-14 15:38:19 +03:00
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 20
|
|
|
|
|
2022-11-01 18:17:45 +03:00
|
|
|
yugabyte:
|
2022-11-17 16:53:04 +03:00
|
|
|
image: yugabytedb/yugabyte
|
2022-11-01 18:17:45 +03:00
|
|
|
command:
|
|
|
|
- bin/yugabyted
|
|
|
|
- start
|
|
|
|
- --daemon=false
|
|
|
|
- --initial_scripts_dir=/
|
|
|
|
ports:
|
|
|
|
- "65009:5433"
|
|
|
|
environment:
|
|
|
|
YSQL_USER: "hasura"
|
|
|
|
YSQL_PASSWORD: "hasura"
|
|
|
|
YSQL_DB: "hasura"
|
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /var/lib/postgresql/data
|
2022-11-01 18:17:45 +03:00
|
|
|
|
2021-12-30 14:00:52 +03:00
|
|
|
sqlserver:
|
2022-10-17 16:19:12 +03:00
|
|
|
# We cannot use this image on arm64, as it's not available.
|
|
|
|
# Instead, we use `mcr.microsoft.com/azure-sql-edge`.
|
|
|
|
# This uses an environment variable so it can be overridden by scripts to
|
|
|
|
# provide that image instead.
|
2022-10-06 18:48:51 +03:00
|
|
|
image: ${MSSQL_IMAGE:-mcr.microsoft.com/mssql/server:2019-latest}
|
2022-12-19 18:32:31 +03:00
|
|
|
init: true # azure-sql-edge doesn't shut down properly without this
|
2021-12-30 14:00:52 +03:00
|
|
|
ports:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- 1433
|
2021-12-30 14:00:52 +03:00
|
|
|
environment:
|
|
|
|
ACCEPT_EULA: "Y"
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
SA_PASSWORD: "Password!"
|
|
|
|
MSSQL_SA_PASSWORD: "Password!"
|
2022-08-04 13:08:54 +03:00
|
|
|
volumes:
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
- /var/opt/mssql
|
2021-12-30 14:00:52 +03:00
|
|
|
|
2022-10-17 16:19:12 +03:00
|
|
|
# We would prefer to attach the healthcheck directly to the `sqlserver` container.
|
|
|
|
# However, while we can do this in the `mcr.microsoft.com/mssql/server` image,
|
|
|
|
# it's not possible when running on macOS, as we don't use that image, but
|
|
|
|
# instead `mcr.microsoft.com/azure-sql-edge`.
|
|
|
|
# The `mcr.microsoft.com/azure-sql-edge` image does not provide `sqlcmd`.
|
|
|
|
# We therefore need to run it in a separate container.
|
|
|
|
# We can reconsider this once the MSSQL Server image can run on arm64.
|
|
|
|
sqlserver-healthcheck:
|
|
|
|
image: mcr.microsoft.com/mssql-tools
|
2022-12-19 02:05:49 +03:00
|
|
|
platform: linux/amd64
|
2022-10-17 16:19:12 +03:00
|
|
|
command:
|
|
|
|
- sleep
|
|
|
|
- inf
|
|
|
|
init: true # handle signals correctly
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD-SHELL
|
|
|
|
- |
|
Share database configuration across tests.
This enables sharing the Docker Compose-based database configuration across the Haskell-based API tests and the legacy Python integration tests.
Why? Because we depend on different database versions and I keep running out of disk space. I am far too lazy to buy another disk and set up my operating system _again_.
The files in question are:
- _docker-compose/databases.yaml_, which is the base specification for the databases
- _docker-compose.yml_, used by the API tests locally (and for other manual testing), which extends the above
- _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, used by the API tests in CI, which extends _databases.yaml_
- _server/tests-py/docker-compose.yml_, used by the Python integration tests
The changes are summarized as follows:
1. The following snippets are moved from _docker-compose/databases.yaml_ to _docker-compose.yml_ and _.buildkite/docker-compose-files/test-oss-server-hspec.yml_, as they're not strictly necessary for other forms of testing:
- the fixed port mappings (in the range 65000–65010)
- the PostgreSQL initialization
- the SQL Server initialization
2. Environment variables are used a little more in health checks and initialization scripts, as usernames, passwords, etc. can be overridden.
3. The volumes in _docker-compose/databases.yaml_ are made anonymous (unnamed), and the names are only specified in _docker-compose.yml_. We don't need to do this elsewhere.
- For extra fun, I have removed all named volumes from the CI Docker Compose files, as they seem to be unnecessary.
4. _server/tests-py/docker-compose.yml_ now depends on _docker-compose/databases.yaml_.
- This was the point.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6864
GitOrigin-RevId: f22f2839716f543ce8a62f890da244de7e23abaa
2022-11-15 17:31:20 +03:00
|
|
|
/opt/mssql-tools/bin/sqlcmd -S 'sqlserver,1433' -U SA -P "Password!"
|
2022-10-17 16:19:12 +03:00
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
2022-11-10 13:16:17 +03:00
|
|
|
retries: 20
|
2022-10-17 16:19:12 +03:00
|
|
|
# This is commented out because this file can be extended, and dependencies don't work for extensions.
|
|
|
|
# Instead, ensure you also run this one.
|
|
|
|
# depends_on:
|
|
|
|
# sqlserver:
|
|
|
|
# condition: service_started
|
2023-02-16 09:29:19 +03:00
|
|
|
|
|
|
|
mysql:
|
|
|
|
image: mysql
|
|
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: Password123#
|
|
|
|
ports:
|
|
|
|
- "3306:3306"
|