Skip to content

Commit

Permalink
Plugin deps install moved to docker, not install at prestart, clean deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen Fawkes committed Sep 15, 2017
1 parent ad4a623 commit bbd83d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
**/node_modules
npm-debug.log
.git
.gitignore
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:8.2.1-alpine

LABEL com.purrplingcat.name="PurrplingBot"
LABEL com.purrplingcat.version="1.2.0"
LABEL com.purrplingcat.version="1.2.5"
LABEL com.purrplingcat.vendor="PurrplingCat"
LABEL com.purrplingcat.email="dev@purrplingcat.com"
LABEL com.purrplingcat.github="https://github.com/EllenFawkes/PurrplingBot"
Expand All @@ -22,6 +22,9 @@ RUN npm install
# Copy app bundle
COPY . .

# Install plugin dependencies
RUN npm run depmod

# Redirect configs to /data/config
RUN mv config/config.example.json extras/config.example.json && \
rm -rf config && \
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"description": "A discordbot written primary for server PurrplingCat",
"main": "purrplingbot.js",
"scripts": {
"prestart": "./node_modules/recursive-install/recursive-install.js --skip-root",
"depmod": "./node_modules/recursive-install/recursive-install.js --skip-root",
"clean": "/bin/sh -c 'find . -name \"node_modules\" -type d -prune -exec rm -rf \"{}\" \\; ; find . -name \"package-lock.json\" -type f -exec rm \"{}\" \\;'",
"start": "node purrplingbot.js 2>&1 3>&1 | tee -a purrplingbot.log",
"test": "cross-env NODE_ENV=test PORT=8080 node_modules/.bin/ava"
},
Expand Down

0 comments on commit bbd83d1

Please sign in to comment.