-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
167 lines (158 loc) · 3.51 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
version: "3.9"
services:
web:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.app
ports:
- "8080:3000"
networks:
- interhub
profiles: ['app']
depends_on:
solr:
condition: service_started
db:
condition: service_started
restart: unless-stopped
solr-user-fix:
image: alpine
profiles: ['app']
volumes:
- type: bind
source: ./solr-data
target: /var/solr/
command: sh -c "chown -R 8983:8983 /var/solr"
networks:
- interhub
solr:
image: solr
volumes:
- type: bind
source: ./solr-data
target: /var/solr/
ports:
- "8983:8983"
environment:
- SOLR_HEAP=4g
hostname: solr
restart: unless-stopped
profiles: ['app']
networks:
interhub:
aliases:
- solr.charles
depends_on:
solr-user-fix:
condition: service_completed_successfully
memgraph:
image: memgraph/memgraph-mage
ports:
- "7687:7687"
hostname: memgraph
restart: unless-stopped
profiles: ['app']
networks:
interhub:
aliases:
- memgraph.charles
deploy:
resources:
limits:
memory: "1G"
volumes:
- mg-data:/var/lib/memgraph
- type: bind
source: .
target: /app
sqlite-workbench:
image: keinos/sqlite3
hostname: sqlite-workbench
profiles: ['sqlite']
volumes:
- type: bind
source: .
target: /app
ker:
build: ./packages/nanoker
hostname: ker
ports:
- "8547:8547"
restart: unless-stopped
profiles: ['app']
deploy:
resources:
limits:
memory: "512M"
networks:
interhub:
aliases:
- ker.charles
db:
image: postgres
restart: unless-stopped
hostname: db
volumes:
- type: bind
source: ./postgres-data
target: /var/lib/postgresql/data
ports:
- "5432:5432"
deploy:
resources:
limits:
memory: "1G"
profiles: ['app']
environment:
POSTGRES_PASSWORD: charles_explorer_db_password
PGDATA: /var/lib/postgresql/data/pgdata
networks:
interhub:
aliases:
- postgres.charles
seed-data:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.importer
restart: "no"
tty: true
volumes:
- type: bind
source: ./explorer.db
target: /app/explorer.db
- type: bind
source: ./packages/feeder/src/transformers.ts
target: /app/packages/feeder/src/transformers.ts
- type: bind
source: ./packages/database-scripts/
target: /app/packages/database-scripts/
- type: bind
source: ./packages/go-network/
target: /app/packages/go-network/
- type: bind
source: ./.env
target: /app/.env
profiles: ['seeder']
networks:
interhub:
aliases:
- seeder.charles
command:
- /bin/sh
- -c
- |
cd /app
cp /app/.env /app/packages/prisma
cd /app/packages/prisma
npx prisma migrate deploy
cd /app/packages/feeder
npx ts-node src/index.ts
cd /app
rm -f graph.db
sqlite3 /app/explorer.db < /app/packages/database-scripts/sqlite-graph.sql
mv /app/graph.db /app/packages/go-network/graph.db
networks:
interhub:
driver: bridge
volumes:
mg-data: