mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-10 12:25:57 -05:00
add docker file
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.git
|
||||
config.json
|
||||
logs
|
||||
certs
|
||||
cdn
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM node:14-alpine
|
||||
|
||||
RUN apk add --no-cache python3 make gcc g++
|
||||
WORKDIR /app
|
||||
|
||||
COPY "docker/entrypoint.sh" .
|
||||
|
||||
COPY package*.json .
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
VOLUME [ "/app/config.json" ]
|
||||
|
||||
CMD ["sh", "entrypoint.sh"]
|
||||
12
docker/entrypoint.sh
Normal file
12
docker/entrypoint.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
files='config.json certs/nex/datastore/secret.key certs/nex/secret.key certs/nex/public.pem'
|
||||
|
||||
for file in $files; do
|
||||
if [ ! -f $file ]; then
|
||||
echo "$PWD/$file file does not exist. Please mount and try again."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exec node src/server.js
|
||||
Reference in New Issue
Block a user