2022-05-04 04:08:44 +02:00
|
|
|
FROM node:16-alpine as builder
|
2022-05-04 07:46:41 +02:00
|
|
|
RUN apk add --no-cache --virtual .build-deps python3 make g++
|
2021-06-30 00:18:42 +02:00
|
|
|
COPY package.json package-lock.json tsconfig.json entrypoint.sh ./
|
2020-07-05 10:25:57 +02:00
|
|
|
COPY src src
|
2021-06-30 00:18:42 +02:00
|
|
|
RUN npm ci && npm run tsc
|
|
|
|
|
2022-05-04 04:08:44 +02:00
|
|
|
FROM node:16-alpine as app
|
2021-06-30 00:18:42 +02:00
|
|
|
WORKDIR /usr/src/app
|
2022-05-06 04:50:07 +02:00
|
|
|
RUN apk add git postgresql-client
|
2022-05-04 07:46:41 +02:00
|
|
|
COPY --from=builder ./node_modules ./node_modules
|
|
|
|
COPY --from=builder ./dist ./dist
|
|
|
|
COPY ./.git ./.git
|
2020-07-05 05:37:57 +02:00
|
|
|
COPY entrypoint.sh .
|
2021-06-30 00:18:42 +02:00
|
|
|
COPY databases/*.sql databases/
|
2020-07-05 05:37:57 +02:00
|
|
|
EXPOSE 8080
|
2022-05-04 04:08:44 +02:00
|
|
|
CMD ./entrypoint.sh
|