1
0
mirror of synced 2024-11-12 01:10:47 +01:00

add dockerfile as an experiment

This commit is contained in:
Luna 2022-11-24 14:09:50 +00:00
parent 21916d266b
commit 2d7338a9db
2 changed files with 35 additions and 0 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
dist/
.git/
*.example
*.example.json
*.bat

30
Dockerfile Normal file
View File

@ -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"]