Update account Dockerfile patches from account PR 73

This commit is contained in:
Matthew Lopez
2023-12-20 10:55:29 -05:00
parent 69cc46905e
commit 57214ad0f3
4 changed files with 25 additions and 44 deletions

View File

@@ -1,14 +0,0 @@
diff --git i/Dockerfile w/Dockerfile
index a810a90..93c8f2a 100644
--- i/Dockerfile
+++ w/Dockerfile
@@ -11,6 +11,8 @@ RUN npm install
COPY . ./
-VOLUME [ "/app/config.json", "/app/certs" ]
+RUN npm run build
+
+VOLUME [ "/app/certs" ]
CMD ["sh", "entrypoint.sh"]

View File

@@ -0,0 +1,25 @@
diff --git i/Dockerfile w/Dockerfile
index a810a90..3f73456 100644
--- i/Dockerfile
+++ w/Dockerfile
@@ -1,16 +1,13 @@
-FROM node:18-alpine
+FROM node:20-alpine
-RUN apk add --no-cache python3 make gcc g++
WORKDIR /app
-COPY "docker/entrypoint.sh" ./
-
COPY package*.json ./
-RUN npm install bcrypt && npm rebuild bcrypt --build-from-source
RUN npm install
COPY . ./
+RUN npm run build
-VOLUME [ "/app/config.json", "/app/certs" ]
+VOLUME [ "/app/certs" ]
-CMD ["sh", "entrypoint.sh"]
+CMD ["node", "--inspect=0.0.0.0:9229" "./dist/server.js"]

View File

@@ -1,10 +0,0 @@
diff --git i/docker/entrypoint.sh w/docker/entrypoint.sh
index 2c6aa02..c3c375e 100644
--- i/docker/entrypoint.sh
+++ w/docker/entrypoint.sh
@@ -25,4 +15,4 @@ for file in $keys; do
fi
done
-exec node src/server.js
+exec node --inspect=0.0.0.0:9229 dist/server.js

View File

@@ -1,20 +0,0 @@
diff --git i/docker/entrypoint.sh w/docker/entrypoint.sh
index 2c6aa02..c3c375e 100644
--- i/docker/entrypoint.sh
+++ w/docker/entrypoint.sh
@@ -1,15 +1,5 @@
#!/bin/sh
-# this doesnt check game server specific certs, only static file paths
-files='config.json'
-
-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
-
# check for keys
keys='certs/nex/datastore/secret.key certs/service/account/secret.key certs/service/account/aes.key certs/service/account/private.pem certs/service/account/public.pem'
for file in $keys; do