diff options
author | Hayden Young <hi@hbjy.dev> | 2021-10-15 13:49:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 13:49:55 +0000 |
commit | da7a87d3917463a8464cd32567ecb0c102d4bf34 (patch) | |
tree | 3d52369beab901f93eba3861f46cd17e8f8ac2f9 /api | |
parent | :bug: fix unittests (diff) | |
download | server-da7a87d3917463a8464cd32567ecb0c102d4bf34.tar.xz |
fix: make API dockerfile use correct setup steps
Diffstat (limited to 'api')
-rw-r--r-- | api/Dockerfile | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/api/Dockerfile b/api/Dockerfile index 08d15f72..78256be6 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,12 +1,28 @@ 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/fosscord-server -COPY package.json . -COPY package-lock.json . -RUN npm rebuild bcrypt --build-from-source && npm install canvas --build-from-source +RUN apk add --no-cache \ + make \ + gcc \ + g++ \ + python \ + cairo-dev \ + jpeg-dev \ + pango-dev \ + giflib-dev + +WORKDIR /usr/src/fosscord-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 npm install -COPY . . + +COPY api/ . + +RUN npm run build + EXPOSE 3001 -RUN npm run build-docker CMD ["node", "dist/start.js"] |