From 2d7338a9dbbab593d687e9209b4fcafe7a043c82 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 24 Nov 2022 14:09:50 +0000 Subject: [PATCH] add dockerfile as an experiment --- .dockerignore | 5 +++++ Dockerfile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e59b5bd --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +dist/ +.git/ +*.example +*.example.json +*.bat \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..622db5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM node:18-alpine + +WORKDIR /server + +# Copy the package file over +COPY package*.json ./ + +# tsconfig definitions +COPY tsconfig*.json . + +# Copy the entire app source tree +COPY . . + +RUN npm install + +# ALLnet +EXPOSE 80 +# Mucha +EXPOSE 10082 +# Service +EXPOSE 9002 + +# Compile protobuf definitions +RUN npm run build_protos + +# Compile the application source code +RUN npx tsc + +# Entrypoint +CMD ["node", "dist"] \ No newline at end of file