2022-11-21 20:36:11 +01:00
|
|
|
FROM node:18-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-11-21 20:36:11 +01:00
|
|
|
FROM node:18-alpine as app
|
2021-06-30 00:18:42 +02:00
|
|
|
WORKDIR /usr/src/app
|
2022-10-23 14:19:06 +02:00
|
|
|
RUN apk add --no-cache git postgresql-client
|
2022-05-04 07:46:41 +02:00
|
|
|
COPY --from=builder ./node_modules ./node_modules
|
|
|
|
COPY --from=builder ./dist ./dist
|
2024-03-17 18:40:53 +01:00
|
|
|
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-10-23 14:19:06 +02:00
|
|
|
CMD ./entrypoint.sh
|