Skip to content

Commit

Permalink
fix(docker): Make Docker build faster (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Nov 8, 2020
1 parent ab3b927 commit 04b82c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM node:10.16.3-slim

# Install Make and Python (for node-gyp and argon2)
RUN apt-get update
RUN apt-get -y install build-essential python graphicsmagick

# Create app directory
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
python \
graphicsmagick \
&& rm -rf /var/lib/apt/lists/*

# Install and build app dependencies
WORKDIR /usr/src/app

# Install app dependencies

COPY ./package*.json /usr/src/app/
RUN npm install --no-audit --production

Expand Down
1 change: 1 addition & 0 deletions app/lib/my-http-wrapper/http/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ exports.Application = class Application {
getExpressApp() {
if (this._expressApp) return this._expressApp;
const app = express();
// app.set('view engine', 'hogan'); // TODO: use hogan.js to render "mustache" templates when res.render() is called
app.use(noCache); // called on all requests
app.use(express.static(this._publicDir));
app.use(makeBodyParser(this._uploadSettings)); // parse uploads and arrays from query params
Expand Down

0 comments on commit 04b82c5

Please sign in to comment.