-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 2.42 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
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- "9092:9092"
container_name: kafka-service # if you have a dependency on kafka, now inside your docker container, your broker will be "kafka-service:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-service:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
fastapi_webapp:
build:
context: .
dockerfile: ./python-app/Dockerfile # Build the Dockerfile from the python-app directory
container_name: fastapi-app
volumes:
- ./python-app:/app # Mount the app directory for live updates
- ./client_secret.json:/app/client_secret.json # Mount the secret.json file
environment:
- SECRET_FILE=/app/client_secret.json
- KAFKA_BOOTSTRAP_SERVERS=kafka-service:9092
- HORIZON_TX_URL=https://horizon-testnet.stellar.org/transactions
- KAFKA_FRAUD_TOPIC=ledger.events.fraud
- KAFKA_CONSUMER_GROUP=webapp-fraud-service
ports:
- "8000:8000"
depends_on:
- kafka
cdp_processor:
build:
context: ./cdp_processor
dockerfile: Dockerfile
volumes:
- $HOME/.config/gcloud/application_default_credentials.json:/.config/gcp/credentials.json:ro
- fraud_accts_data:/lmdb
environment:
GOOGLE_APPLICATION_CREDENTIALS: /.config/gcp/credentials.json
KAFKA_BOOTSTRAP_SERVER: kafka-service:9092
# set SEED_ACCOUNTS to "true" to trigger generation of four accounts
# on testnet and insert 3 of them into fraud accounts lookup data with
# unsafe/malicious tags, log to console the pub/priv key pairs for each.
SEED_ACCOUNTS: "false"
depends_on:
- kafka
- fraud_data_fetch
fraud_data_fetch:
build:
context: .
dockerfile: ./fetch_store_unsafe_accts/Dockerfile
volumes:
- ./fetch_store_unsafe_accts:/app/fetch_store_unsafe_accts
- fraud_accts_data:/app/fraud_accts_data
environment:
FETCH_INTERVAL_MINUTES: 4
DOCKER_ENV: "true"
command: ["python", "fetch_store_unsafe_accts/fetch_and_store.py"]
ports:
- "8080:8080"
# Named volume for fraud data
volumes:
fraud_accts_data: