Mirror of https://github.com/roostorg/osprey
github.com/roostorg/osprey
1# Test-specific docker-compose that extends the main one
2# Usage: docker compose -f docker-compose.yaml -f docker-compose.test.yaml --profile test <command>
3
4services:
5 postgres:
6 volumes: !reset []
7
8 minio:
9 volumes: !reset []
10
11 etcd:
12 container_name: etcd
13 image: quay.io/coreos/etcd:v3.4.18
14 ports:
15 - "2379:2379"
16 environment:
17 - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
18 - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
19 - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
20 - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd:2380
21 - ETCD_INITIAL_CLUSTER=etcd=http://etcd:2380
22 - ETCD_NAME=etcd
23 - ETCD_DATA_DIR=/etcd-data
24 - ETCD_ENABLE_V2=true
25 healthcheck:
26 test:
27 [
28 "CMD",
29 "etcdctl",
30 "--endpoints=http://localhost:2379",
31 "endpoint",
32 "health",
33 ]
34 interval: 10s
35 timeout: 5s
36 retries: 5
37 restart: unless-stopped
38
39 test_runner:
40 container_name: osprey_test_runner
41 build:
42 context: .
43 dockerfile: osprey_worker/Dockerfile
44 depends_on:
45 kafka:
46 condition: service_healthy
47 kafka-topic-creator:
48 condition: service_completed_successfully
49 bigtable:
50 condition: service_healthy
51 bigtable-initializer:
52 condition: service_completed_successfully
53 minio:
54 condition: service_healthy
55 minio-bucket-init:
56 condition: service_completed_successfully
57 postgres:
58 condition: service_healthy
59 snowflake-id-worker:
60 condition: service_started
61 etcd:
62 condition: service_healthy
63 profiles:
64 - test
65 environment:
66 - PYTHONPATH=/osprey
67 - OSPREY_INPUT_STREAM_SOURCE=kafka
68 - OSPREY_STDOUT_OUTPUT_SINK=True
69 - OSPREY_KAFKA_BOOTSTRAP_SERVERS=["kafka:29092"]
70 - OSPREY_KAFKA_INPUT_STREAM_TOPIC=osprey.actions_input
71 - OSPREY_KAFKA_INPUT_STREAM_CLIENT_ID=localhost
72 - OSPREY_KAFKA_OUTPUT_SINK=True
73 - OSPREY_KAFKA_OUTPUT_TOPIC=osprey.execution_results
74 - OSPREY_KAFKA_OUTPUT_CLIENT_ID=localhost
75 - DD_TRACE_ENABLED=False
76 - DD_DOGSTATSD_DISABLE=True
77 - OSPREY_RULES_SINK_NUM_WORKERS=1
78 - BIGTABLE_EMULATOR_HOST=bigtable:8361
79 - OSPREY_EXECUTION_RESULT_STORAGE_BACKEND=minio
80 - OSPREY_MINIO_ENDPOINT=minio:9000
81 - OSPREY_MINIO_ACCESS_KEY=minioadmin
82 - OSPREY_MINIO_SECRET_KEY=minioadmin123
83 - OSPREY_MINIO_SECURE=false
84 - OSPREY_MINIO_EXECUTION_RESULTS_BUCKET=execution-output
85 - SNOWFLAKE_API_ENDPOINT=http://snowflake-id-worker:8088
86 - SNOWFLAKE_EPOCH=1420070400000
87 - OSPREY_RULES_PATH=./example_rules
88 - OSPREY_DISABLE_VALIDATION_EXPORTER=true
89 - DRUID_URL=http://druid-broker:8082
90 - POSTGRES_HOSTS={"osprey_db":"postgresql://osprey:FoolishPassword@postgres:5432/osprey"}
91 - ETCD_PEERS=http://etcd:2379
92 - TESTING=true
93 volumes:
94 - ./osprey_worker:/osprey/osprey_worker
95 - ./osprey_rpc:/osprey/osprey_rpc
96 - ./example_rules:/osprey/example_rules
97 - ./entrypoint.sh:/osprey/entrypoint.sh
98 # entrypoint: "uv run pytest"
99 command: ["run-tests"]