-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yaml
174 lines (174 loc) · 8.43 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
version: '3.8'
services:
wallet:
container_name: '${STAGE}-${APP_NAME}-wallet'
build: ./wallet
ports:
- '9999:8888'
volumes:
- ${WALLET_DATA}:/opt/application/data
postgres:
container_name: '${STAGE}-${APP_NAME}-postgres'
image: postgres:13.10-alpine
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: '${POSTGRES_USER}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_DB: '${POSTGRES_DB}'
hapi:
container_name: '${STAGE}-${APP_NAME}-hapi'
build: ./hapi
ports:
- '9090:9090'
volumes:
- type: bind
source: ./hapi
target: /app
working_dir: /app
command: bash -c "pm2-runtime app.json --watch"
environment:
HAPI_EOS_API_NETWORK_NAME: '${HAPI_EOS_API_NETWORK_NAME}'
HAPI_EOS_API_ENDPOINTS: '${HAPI_EOS_API_ENDPOINTS}'
HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT: '${HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT}'
HAPI_EOS_API_CHAIN_ID: '${HAPI_EOS_API_CHAIN_ID}'
HAPI_EOS_BASE_ACCOUNT: '${HAPI_EOS_BASE_ACCOUNT}'
HAPI_EOS_BASE_ACCOUNT_PASSWORD: '${HAPI_EOS_BASE_ACCOUNT_PASSWORD}'
HAPI_EOS_GET_FAUCET_ACCOUNT: '${HAPI_EOS_GET_FAUCET_ACCOUNT}'
HAPI_EOS_FAUCET_ACCOUNT: '${HAPI_EOS_FAUCET_ACCOUNT}'
HAPI_EOS_FAUCET_ACCOUNT_PASSWORD: '${HAPI_EOS_FAUCET_ACCOUNT_PASSWORD}'
HAPI_EOS_MECHANICS_ACCOUNT: '${HAPI_EOS_MECHANICS_ACCOUNT}'
HAPI_EOS_MECHANICS_PASSWORD: '${HAPI_EOS_MECHANICS_PASSWORD}'
HAPI_EOS_MECHANICS_CUSTOM_PERMISSION: '${HAPI_EOS_MECHANICS_CUSTOM_PERMISSION}'
HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION: '${HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION}'
HAPI_EOS_WALLET_URL: '${HAPI_EOS_WALLET_URL}'
HAPI_EOS_BP_JSON_ON_CHAIN: '${HAPI_EOS_BP_JSON_ON_CHAIN}'
HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT: '${HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT}'
HAPI_EOS_BP_JSON_ON_CHAIN_TABLE: '${HAPI_EOS_BP_JSON_ON_CHAIN_TABLE}'
HAPI_EOS_BP_JSON_ON_CHAIN_SCOPE: '${HAPI_EOS_BP_JSON_ON_CHAIN_SCOPE}'
HAPI_HASURA_URL: '${HAPI_HASURA_URL}'
HAPI_HASURA_ADMIN_SECRET: '${HAPI_HASURA_ADMIN_SECRET}'
HAPI_SERVER_PORT: '${HAPI_SERVER_PORT}'
HAPI_SERVER_ADDRESS: '${HAPI_SERVER_ADDRESS}'
HAPI_DATABASE_URL: '${HAPI_DATABASE_URL}'
HAPI_SYNC_PRODUCERS_INTERVAL: '${HAPI_SYNC_PRODUCERS_INTERVAL}'
HAPI_SYNC_PRODUCER_INFO_INTERVAL: '${HAPI_SYNC_PRODUCER_INFO_INTERVAL}'
HAPI_SYNC_PRODUCER_CPU_INTERVAL: '${HAPI_SYNC_PRODUCER_CPU_INTERVAL}'
HAPI_EOS_EXCHANGE_RATE_API: '${HAPI_EOS_EXCHANGE_RATE_API}'
HAPI_COINGECKO_API_TOKEN_ID: '${HAPI_COINGECKO_API_TOKEN_ID}'
HAPI_REWARDS_TOKEN: '${HAPI_REWARDS_TOKEN}'
HAPI_SYNC_STATS_INTERVAL: '${HAPI_SYNC_STATS_INTERVAL}'
HAPI_SYNC_SCHEDULE_HISTORY_INTERVAL: '${HAPI_SYNC_SCHEDULE_HISTORY_INTERVAL}'
GOOGLE_APPLICATION_CREDENTIALS: '${GOOGLE_APPLICATION_CREDENTIALS}'
HAPI_RE_CAPTCHA_PROJECT_ID: '${HAPI_RE_CAPTCHA_PROJECT_ID}'
HAPI_PUBLIC_RE_CAPTCHA_KEY: '${HAPI_PUBLIC_RE_CAPTCHA_KEY}'
HAPI_CREATE_ACCOUNT_ACTION_NAME: '${HAPI_CREATE_ACCOUNT_ACTION_NAME}'
HAPI_EOSRATE_GET_STATS_URL: '${HAPI_EOSRATE_GET_STATS_URL}'
HAPI_EOSRATE_GET_STATS_USER: '${HAPI_EOSRATE_GET_STATS_USER}'
HAPI_EOSRATE_GET_STATS_PASSWORD: '${HAPI_EOSRATE_GET_STATS_PASSWORD}'
HAPI_EOS_BLOCK_HISTORY_DAYS: '${HAPI_EOS_BLOCK_HISTORY_DAYS}'
HAPI_EOS_MAX_CPU_BLOCK: '${HAPI_EOS_MAX_CPU_BLOCK}'
HAPI_EOS_MAX_NET_BLOCK: '${HAPI_EOS_MAX_NET_BLOCK}'
HAPI_EOS_MISSED_BLOCKS_ENABLED: '${HAPI_EOS_MISSED_BLOCKS_ENABLED}'
hapi-evm:
container_name: '${STAGE}-${APP_NAME}-hapi-evm'
build: ./hapi-evm
ports:
- '9091:9090'
volumes:
- type: bind
source: ./hapi-evm
target: /app
working_dir: /app
command: bash -c "yarn && yarn start:dev"
environment:
HAPI_EVM_SERVER_PORT: '${HAPI_EVM_SERVER_PORT}'
HAPI_EVM_SERVER_ADDRESS: '${HAPI_EVM_SERVER_ADDRESS}'
HAPI_EVM_HASURA_URL: '${HAPI_EVM_HASURA_URL}'
HAPI_EVM_HASURA_ADMIN_SECRET: '${HAPI_EVM_HASURA_ADMIN_SECRET}'
HAPI_EVM_DATABASE_URL: '${HAPI_EVM_DATABASE_URL}'
HAPI_EVM_ENDPOINT: '${HAPI_EVM_ENDPOINT}'
HAPI_EVM_API_ENDPOINTS: '${HAPI_EVM_API_ENDPOINTS}'
HAPI_EVM_NETWORK: '${HAPI_EVM_NETWORK}'
HAPI_EVM_NETWORK_CHAIN_ID: '${HAPI_EVM_NETWORK_CHAIN_ID}'
HAPI_EVM_EOS_EVM_ACCOUNT: '${HAPI_EVM_EOS_EVM_ACCOUNT}'
HAPI_EVM_BLOCK_INTERVAL_SEC: '${HAPI_EVM_BLOCK_INTERVAL_SEC}'
HAPI_EVM_HYPERION_API: '${HAPI_EVM_HYPERION_API}'
HAPI_EVM_HYPERION_START_AT: '${HAPI_EVM_HYPERION_START_AT}'
HAPI_EVM_OLD_BLOCK_INTERVAL_SEC: '${HAPI_EVM_OLD_BLOCK_INTERVAL_SEC}'
HAPI_EVM_ATH_INTERVAL_SEC: '${HAPI_EVM_ATH_INTERVAL_SEC}'
HAPI_EVM_CLEAN_OLD_BLOCK_INTERVAL_SEC: '${HAPI_EVM_CLEAN_OLD_BLOCK_INTERVAL_SEC}'
HAPI_EVM_CLEAN_OLD_TRANSFER_INTERVAL_SEC: '${HAPI_EVM_CLEAN_OLD_TRANSFER_INTERVAL_SEC}'
HAPI_EVM_KEEP_HISTORY_FOR_YEARS: '${HAPI_EVM_KEEP_HISTORY_FOR_YEARS}'
hasura:
container_name: '${STAGE}-${APP_NAME}-hasura'
image: hasura/graphql-engine:v2.16.0.cli-migrations-v3
ports:
- '8080:8080'
volumes:
- ./hasura/migrations:/migrations
- ./hasura/metadata:/metadata
environment:
HASURA_GRAPHQL_DATABASE_URL: '${HASURA_GRAPHQL_DATABASE_URL}'
HASURA_GRAPHQL_MIGRATIONS_DIR: /migrations
HASURA_GRAPHQL_METADATA_DIR: /metadata
HASURA_GRAPHQL_SEEDS_DIR: /seeds
HASURA_GRAPHQL_ACTION_BASE_URL: '${HASURA_GRAPHQL_ACTION_BASE_URL}'
HASURA_GRAPHQL_ACTION_EVM_URL: '${HASURA_GRAPHQL_ACTION_EVM_URL}'
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true'
# Local Development Configurations It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: 'true'
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ENABLE_LOGGING: 'true'
# disabled security for local development
# HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
# HASURA_GRAPHQL_UNAUTHORIZED_ROLE: "${HASURA_GRAPHQL_UNAUTHORIZED_ROLE}"
webapp:
container_name: '${STAGE}-${APP_NAME}-webapp'
image: node:18.4.0
stdin_open: true
ports:
- '3000:3000'
volumes:
- ./modules/webapp:/app/node_modules
- type: bind
source: ./webapp
target: /app
working_dir: /app
command: bash -c "yarn && yarn start"
environment:
REACT_APP_TITLE: '${REACT_APP_TITLE}'
REACT_APP_DEFAULT_PRODUCER_LOGO: '${REACT_APP_DEFAULT_PRODUCER_LOGO}'
REACT_APP_FOOTER_LINKS: '${REACT_APP_FOOTER_LINKS}'
REACT_APP_EOS_RATE_LINK: '${REACT_APP_EOS_RATE_LINK}'
REACT_APP_USE_REWARDS: '${REACT_APP_USE_REWARDS}'
REACT_APP_USE_VOTES: '${REACT_APP_USE_VOTES}'
REACT_APP_HASURA_URL: '${REACT_APP_HASURA_URL}'
REACT_APP_EOS_API_NETWORK_NAME: '${REACT_APP_EOS_API_NETWORK_NAME}'
REACT_APP_EOS_API_NETWORK_LABEL: '${REACT_APP_EOS_API_NETWORK_LABEL}'
REACT_APP_EOS_API_NETWORK_LOGO: '${REACT_APP_EOS_API_NETWORK_LOGO}'
REACT_APP_EOS_INCLUDE_TRANSACTION: '${REACT_APP_EOS_INCLUDE_TRANSACTION}'
REACT_APP_EOS_API_HOSTS: '${REACT_APP_EOS_API_HOSTS}'
REACT_APP_EOS_API_PORT: '${REACT_APP_EOS_API_PORT}'
REACT_APP_EOS_API_PROTOCOL: '${REACT_APP_EOS_API_PROTOCOL}'
REACT_APP_EOS_CHAIN_ID: '${REACT_APP_EOS_CHAIN_ID}'
REACT_APP_EOS_USE_BP_JSON_ON_CHAIN: '${REACT_APP_EOS_USE_BP_JSON_ON_CHAIN}'
REACT_APP_EOS_BP_JSON_ON_CHAIN_CONTRACT: '${REACT_APP_EOS_BP_JSON_ON_CHAIN_CONTRACT}'
REACT_APP_EOS_BP_JSON_ON_CHAIN_TABLE: '${REACT_APP_EOS_BP_JSON_ON_CHAIN_TABLE}'
REACT_APP_EOS_BP_JSON_ON_CHAIN_SCOPE: '${REACT_APP_EOS_BP_JSON_ON_CHAIN_SCOPE}'
REACT_APP_TOKEN_SYMBOL: '${REACT_APP_TOKEN_SYMBOL}'
REACT_APP_NETWORK_URL: '${REACT_APP_NETWORK_URL}'
REACT_APP_DISABLED_MENU_ITEMS: '${REACT_APP_DISABLED_MENU_ITEMS}'
REACT_APP_BLOCK_EXPLORER_URL: '${REACT_APP_BLOCK_EXPLORER_URL}'
REACT_APP_VERSION: '${REACT_APP_VERSION}'
REACT_APP_STATE_HISTORY_ENABLED: '${REACT_APP_STATE_HISTORY_ENABLED}'
REACT_APP_GOOGLE_ANALITIC_PAGE_ID: '${REACT_APP_GOOGLE_ANALITIC_PAGE_ID}'
REACT_APP_PUBLIC_RE_CAPTCHA_KEY: '${REACT_APP_PUBLIC_RE_CAPTCHA_KEY}'
REACT_APP_SYNC_TOLERANCE_INTERVAL: '${REACT_APP_SYNC_TOLERANCE_INTERVAL}'
REACT_APP_EVM_ENDPOINT: '${REACT_APP_EVM_ENDPOINT}'
REACT_APP_EVM_BLOCK_EXPLORER_URL: '${REACT_APP_EVM_BLOCK_EXPLORER_URL}'
REACT_APP_EVM_ENDPOINTS: '${REACT_APP_EVM_ENDPOINTS}'
volumes:
postgres_data: