-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yaml
129 lines (113 loc) · 5.66 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
124
125
126
127
128
129
version: '3.6'
services:
w3bapp:
image: ${WS_BACKEND_IMAGE:-ghcr.io/machinefi/w3bstream:main}
depends_on:
- 'postgres'
- 'mqtt_server'
container_name: w3bstream
platform: linux/x86_64
working_dir: /w3bstream
restart: always
ports:
- '8888:8888'
- '8889:8889'
environment:
SRV_APPLET_MGR__EthClient_Endpoints: '{"4689": "https://babel-api.mainnet.iotex.io", "4690": "https://babel-api.testnet.iotex.io", "1": "https://ethereum.iotex.one/v1/mainnet", "5": "https://ethereum.iotex.one/v1/goerli", "137": "https://polygon-rpc.com", "80001": "https://mumbai.polygonscan.com/"}'
SRV_APPLET_MGR__ChainConfig_Configs: '[{"chainID":4689,"name":"iotex-mainnet","endpoint":"https://babel-api.mainnet.iotex.io"},{"chainID":4690,"name":"iotex-testnet","endpoint":"https://babel-api.testnet.iotex.io"},{"chainID":1,"name":"ethereum-mainnet","endpoint":"https://ethereum.iotex.one/v1/mainnet"},{"chainID":5,"name":"goerli","endpoint":"https://ethereum.iotex.one/v1/goerli"},{"chainID":137,"name":"polygon-mainnet","endpoint":"https://polygon-rpc.com"},{"chainID":80001,"name":"mumbai","endpoint":"https://polygon-mumbai-bor.publicnode.com"},{"name":"solana-devnet","endpoint":"https://api.devnet.solana.com"},{"name":"solana-testnet","endpoint":"https://api.testnet.solana.com"},{"name":"solana-mainnet-beta","endpoint":"https://api.mainnet-beta.solana.com"}]'
SRV_APPLET_MGR__Jwt_ExpIn: ${JWT_EXPIN:-1h}
SRV_APPLET_MGR__Jwt_Issuer: ${JWT_ISSUER:-w3bstream}
SRV_APPLET_MGR__Postgres_Master: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432/${POSTGRES_DB:-w3bstream}?sslmode=disable&application_name=mgr
SRV_APPLET_MGR__Postgres_ConnMaxLifetime: 10m
SRV_APPLET_MGR__Postgres_PoolSize: 5
SRV_APPLET_MGR__MonitorDB_Master: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432/${POSTGRES_DB:-w3bstream}?sslmode=disable&application_name=monitor
SRV_APPLET_MGR__MonitorDB_ConnMaxLifetime: 10m
SRV_APPLET_MGR__MonitorDB_PoolSize: 5
SRV_APPLET_MGR__WasmDB: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432
SRV_APPLET_MGR__WasmDBConfig_Endpoint: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432
## mqtt configurations
SRV_APPLET_MGR__MqttBroker_QoS: ONLY_ONCE
SRV_APPLET_MGR__MqttBroker_Server: mqtt://mqtt_server:1883
## log configuraitons
SRV_APPLET_MGR__NewLogger_Format: JSON
SRV_APPLET_MGR__NewLogger_Level: debug
SRV_APPLET_MGR__NewLogger_Output: ALWAYS
SRV_APPLET_MGR__Logger_Format: JSON
SRV_APPLET_MGR__Logger_Level: debug
SRV_APPLET_MGR__Logger_Output: ALWAYS
SRV_APPLET_MGR__MetricsCenter_Endpoint: http://prometheus:9090
SRV_APPLET_MGR__Server_Port: "8888"
SRV_APPLET_MGR__ServerEvent_Port: "8889"
SRV_APPLET_MGR__LocalFS_Root: /w3bstream/asserts
SRV_APPLET_MGR__UploadConf_DiskReserveBytes: "20971520"
SRV_APPLET_MGR__UploadConf_FilesizeLimitBytes: "10971520"
SRV_APPLET_MGR__UploadConf_Root: ./asserts
# redis
SRV_APPLET_MGR__Redis_DB: "1"
SRV_APPLET_MGR__Redis_Host: redis-server
SRV_APPLET_MGR__Redis_Password: "w3bredispasS"
SRV_APPLET_MGR__Redis_Port: "6379"
SRV_APPLET_MGR__Redis_Prefix: 'dev:srv-applet-mgr:'
volumes:
- w3bstream_assets:/w3bstream/asserts
w3bstream-studio:
image: ${WS_STUDIO_IMAGE:-ghcr.io/machinefi/w3bstream-studio:main}
container_name: w3bstream-studio
restart: always
platform: linux/x86_64
working_dir: /w3bstream-studio
command: ['node', 'server.js']
depends_on:
- 'postgres'
- 'w3bapp'
ports:
- '3000:3000'
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432/${POSTGRES_DB:-w3bstream}?application_name=studio
DATABASE_URL_APPLET_MANAGEMENT: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432/${POSTGRES_DB:-w3bstream}?schema=applet_management&application_name=studio
DATABASE_URL_MONITOR: postgresql://${POSTGRES_USER:-w3badmin}:${POSTGRES_PASSWORD:-PaSsW0Rd}@postgres:5432/${POSTGRES_DB:-w3bstream}?schema=monitor&application_name=studio
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://w3bapp:8888}
NEXT_PUBLIC_EVENT_URL: ${NEXT_PUBLIC_API_URL:-http://w3bapp:8889}
NEXT_PUBLIC_MQTT_URL: ${NEXT_PUBLIC_MQTT_URL:-mqtt://mqtt_server:1883}
NEXT_PUBLIC_METRICS_URL: ${NEXT_PUBLIC_METRICS_URL:-http://prometheus:9090}
NEXT_PUBLIC_GATEWAY_HTTP_URL: https://dev.w3bstream.com/api/w3bapp/event/:projectName
NEXT_PUBLIC_GATEWAY_MQTT_URL: mqtt://dev.w3bstream.com:1883
ADMIN_KEY: ${ADMIN_KEY:-iotex.W3B.admin}
JWT_SIGN_KEY: ${JWT_SIGN_KEY:-xxxx}
mqtt_server:
image: eclipse-mosquitto:1.6.15
container_name: mosquitto
restart: always
ports:
- '1883:1883'
volumes:
- mqtt:/mosquitto/data
postgres:
image: postgres:13
restart: always
command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
environment:
POSTGRES_USER: ${POSTGRES_USER:-w3badmin}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-PaSsW0Rd}
POSTGRES_DB: ${POSTGRES_DB:-w3bstream}
volumes:
- postgres:/var/lib/postgresql/data
ports:
- '5432:5432'
redis-server:
image: 'redis:6.2'
container_name: redis
restart: always
volumes:
- redisdb:/data
environment:
REDIS_PASSWORD: w3bredispasS
command: redis-server --requirepass w3bredispasS
ports:
- '6379:6379'
volumes:
mqtt:
postgres:
w3bstream_assets:
redisdb:
prometheus: