-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
115 lines (99 loc) · 2.33 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
version: "3.7"
x-env: &env
NAME: "governance"
NETWORK_NAME: "mainnet"
# Ports
PORT: "8000"
HEALTH_PORT: "8000"
METRICS_PORT: "9400"
# Prefix
REST_PREFIX: "/api/v1"
WEBSOCKET_PREFIX: "/ws/v1"
HEALTH_PREFIX: "/health"
METRICS_PREFIX: "/metrics"
CORS_ALLOW_ORIGINS: "*"
# Monitoring
HEALTH_POLLING_INTERVAL: "60"
# Logging
LOG_LEVEL: "INFO"
LOG_TO_FILE: "false"
LOG_FILE_NAME: "governance.log"
LOG_FORMAT: "string"
# Kafka
KAFKA_BROKER_URL: "kafka:9092"
SCHEMA_REGISTRY_URL: "http://schemaregistry:8081"
KAFKA_GROUP_ID: "governance-service"
# Topics
CONSUMER_GROUP: "governance-consumer-group"
SCHEMA_NAME_TOPICS: "governance-ws:block"
CONSUMER_TOPIC_BLOCKS: "blocks"
CONSUMER_TOPIC_TRANSACTIONS: "transactions"
CONSUMER_TOPIC_LOGS: "logs"
# DB
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "changeme"
POSTGRES_SERVER: "postgres"
POSTGRES_PORT: "5432"
POSTGRES_DATABASE: "postgres"
# Endpoints
MAX_PAGE_SIZE: "100"
# Redis
REDIS_HOST: "redis"
REDIS_PORT: "6379"
REDIS_PASSWORD: ""
REDIS_CHANNEL: "governance"
REDIS_SENTINEL_CLIENT_MODE: "false"
REDIS_SENTINEL_CLIENT_MASTER_NAME: "master"
services:
governance-api:
build:
context: ${GOVERNANCE_CONTEXT:-.}
target: ${GOVERNANCE_TARGET:-prod}
args:
- SERVICE_NAME=api
ports:
- "8000:8000" # API
- "8180:8180" # Health
- "9400:9400" # Prometheus
security_opt:
- "seccomp:unconfined"
cap_add:
- SYS_PTRACE
volumes:
- ${GOVERNANCE_CONTEXT:-.}/icon_governance:/app
environment:
<<: *env
governance-worker:
build:
context: ${GOVERNANCE_CONTEXT:-.}
target: ${GOVERNANCE_TARGET:-prod}
args:
- SERVICE_NAME=worker
command:
- worker
- head
security_opt:
- "seccomp:unconfined"
cap_add:
- SYS_PTRACE
volumes:
- ${GOVERNANCE_CONTEXT:-.}/icon_governance:/app
environment:
<<: *env
governance-cron:
build:
context: ${GOVERNANCE_CONTEXT:-.}
target: ${GOVERNANCE_TARGET:-prod}
args:
- SERVICE_NAME=worker
command:
- worker
- cron
security_opt:
- "seccomp:unconfined"
cap_add:
- SYS_PTRACE
volumes:
- ${GOVERNANCE_CONTEXT:-.}/icon_governance:/app
environment:
<<: *env