forked from keboola/keboola-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
145 lines (143 loc) · 4.45 KB
/
docker-compose.yml
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
services:
dev:
image: keboolabot/keboola-as-code-dev
build:
context: .
dockerfile: ./provisioning/dev/docker/Dockerfile
links:
- etcd
- redis
- sandboxesMock
volumes:
- ./:/code:z
- cache:/tmp/cache
ulimits:
nofile:
soft: 50000
hard: 50000
environment:
# For all
- TEST_KBC_PROJECTS_FILE=/code/projects.json
- TEST_KBC_PROJECTS_LOCK_HOST
- TEST_KBC_PROJECTS_LOCK_PASSWORD
# For Templates API
- TEMPLATES_STORAGE_API_HOST=connection.keboola.com
- TEMPLATES_API_LISTEN_ADDRESS=0.0.0.0:8000
- TEMPLATES_API_PUBLIC_URL=http://localhost:8000
- TEMPLATES_METRICS_LISTEN_ADDRESS=0.0.0.0:9000
# For Stream Service
- STREAM_NODE_ID=my-node
- STREAM_HOSTNAME=localhost
- STREAM_API_LISTEN=0.0.0.0:8001
- STREAM_API_PUBLIC_URL=http://localhost:8001
- STREAM_SOURCE_HTTP_LISTEN=0.0.0.0:8010
- STREAM_SOURCE_HTTP_PUBLIC_URL=http://localhost:8010
- STREAM_STORAGE_VOLUMES_PATH=/tmp/volumes
- STREAM_STORAGE_API_HOST=connection.keboola.com
- STREAM_METRICS_LISTEN_ADDRESS=0.0.0.0:9001
# Apps Proxy
- APPS_PROXY_LISTEN_ADDRESS=0.0.0.0:8002
- APPS_PROXY_METRICS_LISTEN_ADDRESS=0.0.0.0:9002
- APPS_PROXY_API_PUBLIC_URL=https://hub.keboola.local
- APPS_PROXY_COOKIE_SECRET_SALT=secret
# Disable DataDog integration
- TEMPLATES_DATADOG_ENABLED=false
- STREAM_DATADOG_ENABLED=false
- APPS_PROXY_DATADOG_ENABLED=false
# Etcd for unit tests
- UNIT_ETCD_ENABLED=true
- UNIT_ETCD_ENDPOINT=etcd:2379
- UNIT_ETCD_USERNAME=root
- UNIT_ETCD_PASSWORD=toor
- UNIT_ETCD_NAMESPACE=templates-api
# Etcd for the Templates API`
- TEMPLATES_ETCD_ENDPOINT=etcd:2379
- TEMPLATES_ETCD_USERNAME=root
- TEMPLATES_ETCD_PASSWORD=toor
- TEMPLATES_ETCD_NAMESPACE=templates-api
# Etcd for the Stream Service
- STREAM_ETCD_ENDPOINT=etcd:2379
- STREAM_ETCD_USERNAME=root
- STREAM_ETCD_PASSWORD=toor
- STREAM_ETCD_NAMESPACE=stream
ports:
# PProf
- "4000:4000"
- "4001:4001"
# Templates API
- "8000:8000" # API
- "9000:9000" # metrics
# Stream Service
- "8001:8001" # API
- "9001:9001" # metrics
# Apps Proxy
- "8002:8002" # Proxy
- "9002:9002" # metrics
# Go docs
- "6060:6060"
# To store locks for TEST_KBC_PROJECTS when testing.
redis:
image: redis
hostname: redis
command: ["redis-server", "/etc/redis/redis.conf"]
ports:
- "6379:6379"
volumes:
- ./provisioning/common/redis/redis.conf:/etc/redis/redis.conf
environment:
REDIS_PORT: 6379
# Same etcd is used for all services, but with different namespace
etcd:
hostname: etcd
image: docker.io/bitnami/etcd:3.5.11-debian-11-r3
environment:
ALLOW_NONE_AUTHENTICATION: "no"
ETCD_NAME: "etcd"
ETCD_ROOT_PASSWORD: "toor"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://etcd:2380"
ETCD_INITIAL_CLUSTER_TOKEN: "cluster"
ETCD_INITIAL_CLUSTER": "default=http://etcd:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ETCD_LISTEN_PEER_URLS: "http://0.0.0.0:2380"
ETCD_DISABLE_STORE_MEMBER_ID: "true"
k6:
volumes:
- ./scripts:/scripts
image: keboolabot/stream-benchmark
build:
context: .
dockerfile: ./provisioning/stream/docker/k6/Dockerfile
network_mode: host
ulimits:
nofile:
soft: 50000
hard: 50000
environment:
- K6_API_TOKEN
- K6_API_HOST
- K6_OVERWRITE_SOURCE_HOST
- K6_CLOUD_API_TOKEN
- K6_SCENARIO
- K6_TABLE_MAPPING
- K6_PARALLEL_REQS_PER_USER
- K6_CONST_VIRTUAL_USERS
- K6_CONST_TOTAL_REQUESTS
- K6_CONST_TIMEOUT
- K6_RAMPING_MAX_VIRTUAL_USERS
- K6_RAMPING_UP_DURATION
- K6_RAMPING_STABLE_DURATION
- K6_RAMPING_DOWN_DURATION
- STREAM_PAYLOAD_SIZE
sandboxesMock:
image: mockserver/mockserver:latest
ports:
- 1080:1080
environment:
MOCKSERVER_WATCH_INITIALIZATION_JSON: "true"
MOCKSERVER_PROPERTY_FILE: /config/mockserver.properties
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/sandboxesMock.json
volumes:
- ./provisioning/apps-proxy/dev/sandboxesMock.json:/config/sandboxesMock.json:Z
volumes:
cache: