diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 14:36:57 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 14:36:57 +0200 |
commit | 1f2822597b63c82ab453f5750c105a228c2dc75e (patch) | |
tree | caa4e210f5b995023722948bf2877f234959d625 /api/Dockerfile | |
parent | fix default cdn endpoint for message attachments (diff) | |
download | server-1f2822597b63c82ab453f5750c105a228c2dc75e.tar.xz |
Revert "fix: make API dockerfile use correct setup steps"
This reverts commit da7a87d3917463a8464cd32567ecb0c102d4bf34.
Diffstat (limited to 'api/Dockerfile')
-rw-r--r-- | api/Dockerfile | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/api/Dockerfile b/api/Dockerfile index 41c9363b..08d15f72 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,29 +1,12 @@ -FROM node:lts-alpine AS builder - +FROM node:lts-alpine # needed for native packages (bcrypt, canvas) -RUN apk add --no-cache \ - make \ - gcc \ - g++ \ - python \ - cairo-dev \ - jpeg-dev \ - pango-dev \ - giflib-dev - -WORKDIR /usr/src/api - -RUN npm rebuild bcrypt --build-from-source \ - && npm install canvas --build-from-source - -COPY api/package.json api/package-lock.json ./ -COPY util ../util -RUN cd ../util && npm install && cd ../api && npm install - -COPY api/ . - -RUN npm run build - +RUN apk add --no-cache make gcc g++ python cairo-dev jpeg-dev pango-dev giflib-dev +WORKDIR /usr/src/fosscord-server +COPY package.json . +COPY package-lock.json . +RUN npm rebuild bcrypt --build-from-source && npm install canvas --build-from-source +RUN npm install +COPY . . EXPOSE 3001 - +RUN npm run build-docker CMD ["node", "dist/start.js"] |