graphql-engine/docker-compose/databases.yaml

189 lines
5.1 KiB
YAML
Raw Normal View History

version: "3.6"
Auto-launch graphql-engine (close hasura/graphql-engine#7801, hasura/graphql-engine#7827 ) Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool. prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911 next pr: https://github.com/hasura/graphql-engine-mono/pull/2922 This implements https://github.com/hasura/graphql-engine/issues/7801 Some points to keep in mind for review: * How state is passed to the tests. Do we like how this works? * I quite like it, with the opaque type [`State`](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/State.hs#L17), we can avoid churn when adding things. * The [setup/teardown](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Spec.hs#L19-L31) seems clean. * By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change. * The various flags passed in the [ServeOptions](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/Constants.hs#L123) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921 GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
2021-11-23 21:15:17 +03:00
services:
Auto-launch graphql-engine (close hasura/graphql-engine#7801, hasura/graphql-engine#7827 ) Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool. prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911 next pr: https://github.com/hasura/graphql-engine-mono/pull/2922 This implements https://github.com/hasura/graphql-engine/issues/7801 Some points to keep in mind for review: * How state is passed to the tests. Do we like how this works? * I quite like it, with the opaque type [`State`](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/State.hs#L17), we can avoid churn when adding things. * The [setup/teardown](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Spec.hs#L19-L31) seems clean. * By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change. * The various flags passed in the [ServeOptions](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/Constants.hs#L123) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921 GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
2021-11-23 21:15:17 +03:00
postgres:
image: postgis/postgis:16-3.4-alpine
platform: linux/amd64
command:
- -F # turn fsync off for speed
- -N 1000 # increase max connections from 100 so we can run more HGEs
Auto-launch graphql-engine (close hasura/graphql-engine#7801, hasura/graphql-engine#7827 ) Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool. prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911 next pr: https://github.com/hasura/graphql-engine-mono/pull/2922 This implements https://github.com/hasura/graphql-engine/issues/7801 Some points to keep in mind for review: * How state is passed to the tests. Do we like how this works? * I quite like it, with the opaque type [`State`](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/State.hs#L17), we can avoid churn when adding things. * The [setup/teardown](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Spec.hs#L19-L31) seems clean. * By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change. * The various flags passed in the [ServeOptions](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/Constants.hs#L123) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921 GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
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
Auto-launch graphql-engine (close hasura/graphql-engine#7801, hasura/graphql-engine#7827 ) Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool. prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911 next pr: https://github.com/hasura/graphql-engine-mono/pull/2922 This implements https://github.com/hasura/graphql-engine/issues/7801 Some points to keep in mind for review: * How state is passed to the tests. Do we like how this works? * I quite like it, with the opaque type [`State`](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/State.hs#L17), we can avoid churn when adding things. * The [setup/teardown](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Spec.hs#L19-L31) seems clean. * By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change. * The various flags passed in the [ServeOptions](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/Constants.hs#L123) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921 GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
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
Auto-launch graphql-engine (close hasura/graphql-engine#7801, hasura/graphql-engine#7827 ) Dupe of https://github.com/hasura/graphql-engine-mono/pull/2853 with branch renamed so it doesn't break a tool. prev pr: https://github.com/hasura/graphql-engine-mono/pull/2911 next pr: https://github.com/hasura/graphql-engine-mono/pull/2922 This implements https://github.com/hasura/graphql-engine/issues/7801 Some points to keep in mind for review: * How state is passed to the tests. Do we like how this works? * I quite like it, with the opaque type [`State`](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/State.hs#L17), we can avoid churn when adding things. * The [setup/teardown](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Spec.hs#L19-L31) seems clean. * By using hspec's own means to pass and denote context, we avoid "getting new ideas" for how to structure the tests -- we use a standard. Hopefully, that means the tests' structure rarely change. * The various flags passed in the [ServeOptions](https://github.com/hasura/graphql-engine-mono/blob/68f33051ca6373c42988e78d069eea2a135dc190/server/tests-hspec/Harness/Constants.hs#L123) - if there are any causes for concern, raise them here. My thinking is that, there are lots. I've picked some "sane" defaults (mostly empty). The tests pass. I think as we add more complex tests, these flags will be scrutinised and updated as needed. I think it's valuable that all flags are explicitly listed here, though. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2921 GitOrigin-RevId: 2c2e70bf784ef571a48509a7e5006fd0f48773b5
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
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:
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
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
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
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:
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
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
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:
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
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
platform: linux/amd64
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
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!"
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
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"