2021-05-09 01:07:24 +02:00
|
|
|
FROM node:lts-alpine
|
2021-06-24 17:22:00 +02:00
|
|
|
# needed for native packages (bcrypt, canvas)
|
|
|
|
RUN apk add --no-cache make gcc g++ python cairo-dev jpeg-dev pango-dev giflib-dev
|
2021-05-09 01:07:24 +02:00
|
|
|
WORKDIR /usr/src/fosscord-api
|
2021-05-29 20:35:39 +02:00
|
|
|
COPY package.json .
|
2021-06-24 17:22:00 +02:00
|
|
|
RUN npm rebuild bcrypt --build-from-source && npm rebuild canvas --build-from-source
|
2021-05-09 01:07:24 +02:00
|
|
|
RUN npm install
|
2021-05-23 15:08:04 +02:00
|
|
|
COPY . .
|
2021-05-23 03:28:19 +02:00
|
|
|
EXPOSE 3001
|
2021-05-29 20:35:39 +02:00
|
|
|
RUN npm run build
|
2021-05-29 21:33:31 +02:00
|
|
|
CMD ["node", "dist/start.js"]
|