forked from eoscostarica/eos-local
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
191 lines (178 loc) · 4.41 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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: '3.5'
services:
postgres:
image: postgres:10.4
volumes:
- ./.dbdata/.pgsql-data:/var/lib/postgresql/data
ports:
- '5432:5432'
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
DB_NAME: eoslocal
DB_USER: user
DB_PASSWORD: pass
POSTGRES_DB: eoslocal
VIRTUAL_HOST: postgres.eoslocal.io
VIRTUAL_PORT: 5432
networks:
eoslocal:
aliases:
- postgres.eoslocal.io
pgweb:
image: sosedoff/pgweb:latest
restart: always
ports:
- "8081:8081"
environment:
DATABASE_URL: postgres://user:pass@postgres:5432/eoslocal?sslmode=disable
VIRTUAL_HOST: pgweb.eoslocal.io
VIRTUAL_PORT: 8081
depends_on:
- postgres
networks:
eoslocal:
aliases:
- pgweb.eoslocal.io
flyway:
image: boxfuse/flyway:5.2.1
command: -url=jdbc:postgresql://postgres:5432/eoslocal -user=user -password=pass -connectRetries=60 migrate
volumes:
- ./services/postgres/migrations:/flyway/sql
depends_on:
- postgres
networks:
eoslocal:
mongo:
image: mongo
restart: always
volumes:
- ./.dbdata/.mongo-data:/data/db
ports:
- '27017:27017'
environment:
VIRTUAL_HOST: mongo.eoslocal.io
VIRTUAL_PORT: 27017
networks:
eoslocal:
aliases:
- mongo.eoslocal.io
admin-mongo:
image: mrvautin/adminmongo:latest
restart: "always"
ports:
- '8082:8082'
environment:
PORT: 8082
CONN_NAME: fullnode
DB_HOST: mongo.eoslocal.io
DB_PORT: 27017
VIRTUAL_HOST: admin-mongo.eoslocal.io
VIRTUAL_PORT: 8082
depends_on:
- mongo
- fullnode
networks:
eoslocal:
aliases:
- admin-mongo.eoslocal.io
fullnode:
build:
context: ./services/eos-fullnode
dockerfile: Dockerfile
image: eoslocal/fullnode
stop_grace_period: 3m0s
ports:
- '8840:8888'
- '9840:9876'
environment:
WAIT_HOSTS: mongo:27017, eosiodev:8888
WAIT_HOSTS_TIMEOUT: 60
DATA_DIR: /opt/eosio/bin/data-dir
VIRTUAL_HOST: fullnode.eoslocal.io
VIRTUAL_PORT: 8888
depends_on:
- mongo
- eosiodev
volumes:
- 'fullnode:/opt/eosio/bin/data-dir'
- './services/eos-fullnode/config.ini:/opt/eosio/bin/data-dir/config.ini'
networks:
eoslocal:
aliases:
- fullnode.eoslocal.io
# only required for dev
eosiodev:
build:
context: ./services/eos-dev
dockerfile: Dockerfile
image: eoslocal/eosiodev
stop_grace_period: 3m0s
ports:
- '8888:8888'
- '9830:9876'
environment:
DATA_DIR: /root/data-dir
CONFIG_DIR: /opt/application/config
VIRTUAL_HOST: eosiodev.eoslocal.io
VIRTUAL_PORT: 8888
volumes:
- eosiodev:/root/data-dir
- ./services/eos-dev:/opt/application
networks:
eoslocal:
aliases:
- eosiodev.eoslocal.io
demux:
build:
context: ./services/demux
dockerfile: ./Dockerfile
args:
SERVICE: 'demux'
image: eoslocal/demux
volumes:
- ./services/demux:/opt/application # mount demux service folder
- /opt/application/node_modules # prevents host/container conflicts
depends_on:
- mongo
- postgres
- eosiodev
environment:
DB_USER: user
DB_PASSWORD: pass
DB_PORT: 5432
DB_NAME: eoslocal
DB_HOST: postgres
DB_SCHEMA: public
CHAIN_HOST: 'http://eosiodev:8888'
CHAIN_INIT_BLOCK: 10
MONGO_URI: 'mongodb://mongo:27017'
MONGO_DB: EOSFN
WAIT_HOSTS: postgres:5432, mongo:27017
WAIT_HOSTS_TIMEOUT: 60
VIRTUAL_HOST: demux.eoslocal.io
VIRTUAL_PORT: 3030
ports:
- '3030:3030'
networks:
eoslocal:
aliases:
- demux.eoslocal.io
# nginx reverse proxy that allows accesing the services directly on the host machine
# the wildcard *.esolocal.io that points to 127.0.0.1,
# therefore as long as you can hit the dns server it will redirect all requests to your machine
# and nginx-proxy does the internal docker network routing to the right service
nginx-proxy:
image: jwilder/nginx-proxy:alpine
ports:
- '80:80'
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
eoslocal:
volumes:
eosiodev:
fullnode:
networks:
eoslocal:
name: eoslocal