generated from wayfair-incubator/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yaml
123 lines (111 loc) · 3.4 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.5'
x-mount-app-and-user-git-config: &mount-app-and-user-git-config
volumes:
- ./:/app
- ~/.gitconfig:/home/dagger/.gitconfig # allow script to commit as user
services:
dagger_test_app:
tty: true
build: .
container_name: dagger_test_app
depends_on:
- zookeeper
- kafka
- aerospike
command: [ "./wait-for-it.sh", "kafka:29092", "--", "python3", "-m", "integration_tests.test_app",
"worker", "-l", "info" ]
environment:
- KAFKA_BOOSTRAP_SERVER_NAME=kafka
- KAFKA_BOOSTRAP_SERVER_PORT=9092
- SCHEMA_REGISTRY_URL=http://schema-registry-server:8081
- SCHEMA_REGISTRY_SERVER=schema-registry-server
- SCHEMA_REGISTRY_SERVER_PORT=8081
- AEROSPIKE_HOST=aerospike
ports:
- "6066:6066"
volumes:
- ./:/app
networks:
- dagger_py
zookeeper:
image: confluentinc/cp-zookeeper:7.3.2
hostname: zookeeper
environment:
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
- ZOOKEEPER_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- ZOOKEEPER_TRANSACTION_STATE_LOG_MIN_ISR=1
ports:
- 52181:2181
networks:
- dagger_py
kafka:
# pinned due to https://github.com/confluentinc/kafka-images/issues/127
image: confluentinc/cp-kafka:7.3.2
hostname: kafka
container_name: kafka
ports:
- 9092:9092
depends_on:
- zookeeper
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_LISTENERS=LISTENER_LOCAL://0.0.0.0:9092,LISTENER_DOCKER://0.0.0.0:29092,PLAINTEXT://0.0.0.0:9093
- KAFKA_ADVERTISED_LISTENERS=LISTENER_LOCAL://localhost:9092,LISTENER_DOCKER://kafka:29092,PLAINTEXT://kafka:9093
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=LISTENER_LOCAL:PLAINTEXT,LISTENER_DOCKER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_BROKER_ID=0
- KAFKA_INTER_BROKER_LISTENER_NAME=LISTENER_DOCKER
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=100
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
networks:
- dagger_py
aerospike:
image: aerospike/aerospike-server
volumes:
- $PWD:/opt/aerospike/etc
networks:
- dagger_py
# a fully loaded development environment to test new code
devbox: &devbox
build:
dockerfile: ./docker/devbox.dockerfile
context: .
image: "wayfair/dagger-devbox"
volumes:
- ./:/app
# run all the tests and linting locally
# - black & isort will format code to address issues
test:
<<: *devbox
command: docker/run_tests.sh --format-code
integration_test:
<<: *devbox
command: ["./wait-for-it.sh", "kafka:29092", "--", "sh", "docker/run_integration_tests.sh"]
depends_on:
- dagger_test_app
networks:
- dagger_py
# test the documentation examples to make sure they can be run with Python
validateDocExamples:
<<: *devbox
command: docker/validate_docs.sh
bump:
<<: *devbox
<<: *mount-app-and-user-git-config
entrypoint: docker/bump_version.sh
# generate and serve the project documentation locally
mkdocs: &mkdocs
<<: *devbox
entrypoint: "mkdocs"
ports:
- "8000:8000"
command: [ "serve", "--dev-addr=0.0.0.0:8000" ]
mike:
<<: *mkdocs
<<: *mount-app-and-user-git-config
entrypoint: "mike"
networks:
dagger_py: