Skip to content

Commit

Permalink
Cleaned up Dockerfile and build
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrot committed Nov 25, 2021
1 parent f298921 commit 64e11af
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
test
#config/config.yaml
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16-alpine3.11

RUN apk update && \
apk add wget python3 build-base
WORKDIR /bot

COPY . /bot
RUN cd bot/ && \
npm i

RUN apk update
RUN apk add wget python3 build-base
RUN rm -rf node_modules
RUN npm install

CMD ["npm", "run", "prod", "--prefix", "/bot"]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"scripts": {
"tsc": "tsc",
"dev": "ts-node-dev ./src/index.ts",
"prod": "tsc && cp -r ./src/addons/web/* ./build/src/addons/web && node ./build/src/index.js",
"build": "tsc && cp -r ./src/addons/web/* ./build/src/addons/web",
"prod": "ts-node ./src/index.ts",
"build": "tsc",
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'test/**/*.ts' --exit"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"moduleResolution": "node",
"esModuleInterop": true
},
"include": ["./src/**/*"]
"include": ["./src/**/**/*"]
}

0 comments on commit 64e11af

Please sign in to comment.