x-logging: &default-logging driver: json-file options: max-size: "50m" max-file: "5" services: mysql: image: mysql:8.0 logging: *default-logging environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: waoowaoo_test MYSQL_ROOT_HOST: "%" ports: - "127.0.0.1:${TEST_MYSQL_PORT:-0}:3306" command: - "--default-authentication-plugin=mysql_native_password" - "--sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION" healthcheck: test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -proot"] interval: 5s timeout: 5s retries: 30 start_period: 15s redis: image: redis:7-alpine logging: *default-logging ports: - "127.0.0.1:${TEST_REDIS_PORT:-0}:6379" command: ["redis-server", "--appendonly", "no"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 30 start_period: 5s temporal-db-bootstrap: image: mysql:8.0 profiles: ["temporal"] restart: "no" logging: *default-logging network_mode: "service:mysql" depends_on: mysql: condition: service_healthy environment: MYSQL_HOST: 127.0.0.1 MYSQL_PORT: "3306" MYSQL_ROOT_PASSWORD: root TEMPORAL_MYSQL_USER: temporal TEMPORAL_MYSQL_PASSWORD: temporal-test-only entrypoint: ["/bin/sh", "-ec"] command: - | MYSQL_PWD="$$MYSQL_ROOT_PASSWORD" mysql \ --protocol=TCP --host="$$MYSQL_HOST" --port="$$MYSQL_PORT" --user=root < /config/docker.yaml test -s /config/docker.yaml temporal: image: temporalio/server:1.31.2 profiles: ["temporal"] restart: unless-stopped logging: *default-logging depends_on: temporal-schema: condition: service_completed_successfully temporal-config: condition: service_completed_successfully environment: DB: mysql8 DB_PORT: "3306" MYSQL_SEEDS: mysql MYSQL_USER: temporal MYSQL_PWD: temporal-test-only BIND_ON_IP: 0.0.0.0 ports: - "127.0.0.1:${TEST_TEMPORAL_PORT:-0}:7233" volumes: - temporal_test_config:/etc/temporal/config/dynamicconfig:ro healthcheck: test: ["CMD", "nc", "-z", "127.0.0.1", "7233"] interval: 5s timeout: 3s retries: 60 start_period: 30s temporal-create-namespace: image: temporalio/admin-tools:1.31.2 profiles: ["temporal"] restart: "no" logging: *default-logging depends_on: temporal: condition: service_healthy environment: TEMPORAL_ADDRESS: temporal:7233 TEMPORAL_NAMESPACE: "${TEST_TEMPORAL_NAMESPACE:-waoowaoo-test}" TEMPORAL_NAMESPACE_RETENTION: 1d TEMPORAL_HEALTH_CHECK_MAX_ATTEMPTS: "60" TEMPORAL_HEALTH_CHECK_SLEEP_SECONDS: "1" entrypoint: ["/bin/sh", "-ec"] command: - | attempt=1 until temporal operator cluster health \ --address "$$TEMPORAL_ADDRESS" >/dev/null 2>&1; do if [ "$$attempt" -ge "$$TEMPORAL_HEALTH_CHECK_MAX_ATTEMPTS" ]; then echo "Temporal test server did not become healthy" >&2 exit 1 fi attempt=$$((attempt + 1)) sleep "$$TEMPORAL_HEALTH_CHECK_SLEEP_SECONDS" done if temporal operator namespace describe \ --namespace "$$TEMPORAL_NAMESPACE" \ --address "$$TEMPORAL_ADDRESS" >/dev/null 2>&1; then exit 0 fi temporal operator namespace create \ --namespace "$$TEMPORAL_NAMESPACE" \ --retention "$$TEMPORAL_NAMESPACE_RETENTION" \ --address "$$TEMPORAL_ADDRESS" volumes: temporal_test_config: