-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
141 lines (134 loc) · 4.56 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
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
version: "3.8"
services:
postgres:
container_name: eosrate_postgres
image: postgres:13.10-alpine
volumes:
- ${POSTGRES_DATA}:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
pgweb:
container_name: eosrate_pgweb
image: sosedoff/pgweb:latest
restart: always
ports:
- "8082:8081"
environment:
DATABASE_URL: "${HASURA_GRAPHQL_DATABASE_URL}?sslmode=disable"
depends_on:
- postgres
hapi:
container_name: eosrate_hapi
build:
context: ./hapi
dockerfile: Dockerfile
volumes:
- ./hapi:/app
- /app/node_modules
ports:
- "9090:9090"
command: bash -c "yarn && yarn watch"
environment:
HAPI_SERVER_ADDRESS: "${HAPI_SERVER_ADDRESS}"
HAPI_SERVER_PORT: "${HAPI_SERVER_PORT}"
HAPI_VALID_USERS: "${HAPI_VALID_USERS}"
HAPI_POSTGRES_USER: "${HAPI_POSTGRES_USER}"
HAPI_POSTGRES_PASSWORD: "${HAPI_POSTGRES_PASSWORD}"
HAPI_POSTGRES_PORT: "${HAPI_POSTGRES_PORT}"
HAPI_POSTGRES_DB: "${HAPI_POSTGRES_DB}"
HAPI_POSTGRES_HOST: "${HAPI_POSTGRES_HOST}"
HAPI_POSTGRES_SCHEMA: "${HAPI_POSTGRES_SCHEMA}"
HAPI_EOS_API_ENDPOINT: "${HAPI_EOS_API_ENDPOINT}"
HAPI_EOS_CHAIN_ID: "${HAPI_EOS_CHAIN_ID}"
HAPI_PROXY_CONTRACT: "${HAPI_PROXY_CONTRACT}"
HAPI_RATING_CONTRACT: "${HAPI_RATING_CONTRACT}"
HAPI_HYPERION_API: "${HAPI_HYPERION_API}"
HAPI_HYPERION_START_AT: "${HAPI_HYPERION_START_AT}"
HAPI_HASURA_URL: "${HAPI_HASURA_URL}"
HAPI_HASURA_ADMIN_SECRET: "${HAPI_HASURA_ADMIN_SECRET}"
depends_on:
- postgres
demux:
container_name: eosrate_demux
build:
context: ./demux
dockerfile: ./Dockerfile
image: eosrate/demux
volumes:
- ./demux:/opt/application
- /opt/application/node_modules
depends_on:
- postgres
- hasura
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_HOST: "${POSTGRES_HOST}"
POSTGRES_SCHEMA: "${POSTGRES_SCHEMA}"
HAPI_EOS_API_ENDPOINT: "${HAPI_EOS_API_ENDPOINT}"
WAIT_HOSTS: postgres:"${POSTGRES_PORT}", hasura:8080
WAIT_HOSTS_TIMEOUT: 60
ports:
- "3030:3030"
networks:
default:
hasura:
container_name: eosrate_hasura
image: hasura/graphql-engine:v2.8.4.cli-migrations-v3
ports:
- "8080:8080"
depends_on:
- postgres
restart: always
environment:
REACT_APP_VERSION: "${REACT_APP_VERSION}"
REACT_APP_RATING_CONTRACT: "${REACT_APP_RATING_CONTRACT}"
REACT_APP_MAINNET_VERSION: "${REACT_APP_MAINNET_VERSION}"
REACT_APP_EDEN_CONTRACT: "${REACT_APP_EDEN_CONTRACT}"
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_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}"
volumes:
- ./hasura/migrations:/migrations
- ./hasura/metadata:/metadata
- ./hasura/seeds:/seeds
webapp:
container_name: eosrate_webapp
build:
context: ./webapp
dockerfile: ./Dockerfile
target: server
image: eosrate/webapp
depends_on:
- hasura
- hapi
ports:
- "80:80"
environment:
REACT_APP_GRAPHQL_HTTP_URL: "${REACT_APP_GRAPHQL_HTTP_URL}"
REACT_APP_GRAPHQL_WS_URL: "${REACT_APP_GRAPHQL_WS_URL}"
REACT_APP_EOS_API_URL: "${REACT_APP_EOS_API_URL}"
REACT_APP_EOS_API_HOST: "${REACT_APP_EOS_API_HOST}"
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_BLOCK_EXPLORER: "${REACT_APP_BLOCK_EXPLORER}"
REACT_APP_NETWORK_MONITOR_URL: "${REACT_APP_NETWORK_MONITOR_URL}"
networks:
default: