docker-compose.test-integration.yml•2.97 kB
---
services:
app:
image: systeminit/ci-base:stable
environment:
- "USE_CI_PG_SETUP=true"
- "SI_TEST_PG_HOSTNAME=postgres-test"
# NOTE: We want to set this to the default postgres port as the tests run
# in *this* container and we're accessing postgres in a peer container
# and not using the external port mapping.
- "SI_TEST_PG_PORT=5432"
- "SI_TEST_NATS_URL=nats"
- "SI_TEST_SPICEDB_URL=http://spicedb:50051"
- "SI_TEST_LOCALSTACK_URL=http://localstack:4566"
- "SI_TEST_S3_ENDPOINT=http://versitygw:9200"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317"
ulimits:
nofile:
soft: 1024000
hard: 1024000
depends_on:
- postgres-test
- nats
- spicedb
- jaeger
- otelcol
- localstack
- versitygw
# This is the same as the pgbouncer test setup in our dev environment
postgres-test:
image: systeminit/pgbouncer:stable
environment:
- "DB_USER=si_test"
- "DB_PASSWORD=bugbear"
- "DB_HOST=db-test"
- "ADMIN_USERS=postgres,dbuser,si_test"
- "AUTH_TYPE=scram-sha-256"
- "MAX_CLIENT_CONN=100000"
- "DEFAULT_POOL_SIZE=10"
- "SERVER_IDLE_TIMEOUT=10"
- "POOL_MODE=transaction"
- "MAX_PREPARED_STATEMENTS=10000"
depends_on:
- db-test
# NOTE: this db is the same configuration as `db-test` under
# `dev/docker-compose.platform.yml`. In the CI environment, there should be
# *no* need for the `postgres` service as we aren't running the full service
# stack.
db-test:
image: systeminit/postgres:stable
environment:
- "POSTGRES_PASSWORD=bugbear"
- "PGPASSWORD=bugbear"
- "POSTGRES_USER=si_test"
- "POSTGRES_DB=si_test"
- "POSTGRES_MULTIPLE_DBS=si_test_dal,si_test_sdf_server,si_test_layer_db,si_test_audit"
command:
- "-c"
- "fsync=off"
- "-c"
- "full_page_writes=off"
nats:
image: systeminit/nats:stable
command:
- "--config"
- "nats-server.conf"
jaeger:
image: systeminit/jaeger:stable
otelcol:
image: systeminit/otelcol:stable
depends_on:
- jaeger
localstack:
image: localstack/localstack:3
spicedb:
build: ../component/spicedb
environment:
- "SPICEDB_LOG_FORMAT=console"
- "SPICEDB_GRPC_PRESHARED_KEY=hobgoblin"
- "SPICEDB_DATASTORE_ENGINE=memory"
- "ZED_KEYRING_PASSWORD=orc"
versitygw:
#<<: *loki-logged-service
image: systeminit/versitygw:stable
entrypoint: ["/bin/sh"]
command:
- "-c"
- |
/usr/local/bin/init-buckets.sh &&
exec /usr/local/bin/versitygw --port :9200 --access siadmin --secret bugbear posix /data
environment:
- "VGW_DATA_DIR=/data"
ports:
- "9200:9200" # S3 API
healthcheck:
test:
- "CMD-SHELL"
- "[ -f /tmp/ready ]"
interval: 5s
timeout: 10s
retries: 5