-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmulti-instance.Dockerfile
More file actions
31 lines (23 loc) · 978 Bytes
/
multi-instance.Dockerfile
File metadata and controls
31 lines (23 loc) · 978 Bytes
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
# NOTE: This Dockerfile compiles an image that uses Debian Stretch as its OS
#
# Build time is fast because the native modules used by our app
# (sodium-native, sqlite3) have precomiled binaries for Debian.
#
# However, the resulting image size is very large (~1.25GB).
#
# Useful for development, but don't ship it. Use 'Dockerfile' instead.
# Node.js LTS 12.x.x from Docker Hub
FROM node:12
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY . .
# Install node_modules
RUN npm set unsafe-perm true
RUN npm install
# Install shardus-network tool
RUN npm install https://gitlab.com/shardus/tools/shardus-network.git#external-support-nodes
COPY node_modules/shardus-global-server node_modules/shardus-global-server
RUN npm run compile
# Start a local network of 10 nodes
CMD [ "sh", "-c", "npx shardus-network create --auto-ip --existing-archivers \"$server_p2p_existingArchivers\" --monitor-url \"$server_reporting_recipient\" 10 && sleep infinity" ]