-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (65 loc) · 1.96 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
version: '3'
services:
redis:
image: redis
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "6379:6379"
datagen:
build:
context: ./data_gen/
command: python /opt/data_gen/gen_fake_data.py
volumes:
- ./data_gen:/opt/data_gen
container_name: datagen
restart: on-failure
environment:
PROJECT_ID: ${PROJECT_ID}
REDIS_PASSWORD: ${REDIS_PASSWORD}
depends_on:
- redis
create_bq_table:
build:
context: ./create_bigquery_table/
command: python /opt/create_bigquery_table/create_bq_table.py
volumes:
- ./create_bigquery_table:/opt/create_bigquery_table
container_name: create_bq_table
restart: on-failure
environment:
PROJECT_ID: ${PROJECT_ID}
BQ_DATASET: ${BQ_DATASET}
BQ_TABLE: ${BQ_TABLE}
create_pubsub:
build:
context: ./create_pubsub/
command: python /opt/create_pubsub/create_pubsub.py
volumes:
- ./create_pubsub:/opt/create_pubsub
container_name: create_pubsub
restart: on-failure
environment:
PROJECT_ID: ${PROJECT_ID}
CLICK_TOPIC: ${CLICK_TOPIC}
CHECKOUT_TOPIC: ${CHECKOUT_TOPIC}
streaming:
build:
context: ./streaming/
command: python /opt/streaming/streaming.py --runner DirectRunner --clicks_input_subscription=projects/${PROJECT_ID}/subscriptions/${CLICK_TOPIC} --checkout_input_subscription=projects/${PROJECT_ID}/subscriptions/${CHECKOUT_TOPIC}
volumes:
- ./streaming:/opt/streaming
container_name: streaming
restart: on-failure
environment:
PROJECT_ID: ${PROJECT_ID}
BQ_DATASET: ${BQ_DATASET}
BQ_TABLE: ${BQ_TABLE}
REDIS_PASSWORD: ${REDIS_PASSWORD}
GOOGLE_APPLICATION_CREDENTIALS: '/opt/streaming/sa.json'
depends_on:
redis:
condition: service_started
create_bq_table:
condition: service_completed_successfully
create_pubsub:
condition: service_completed_successfully