Prepare dockerfile for use, allow configuring via env vars

This commit is contained in:
Ajay
2022-05-03 22:08:44 -04:00
parent a66588619a
commit 5b177a3e53
13 changed files with 93 additions and 46 deletions

View File

@@ -1,14 +1,14 @@
FROM node:14-alpine as builder
FROM node:16-alpine as builder
RUN apk add --no-cache --virtual .build-deps python make g++
COPY package.json package-lock.json tsconfig.json entrypoint.sh ./
COPY src src
RUN npm ci && npm run tsc
FROM node:14-alpine as app
FROM node:16-alpine as app
WORKDIR /usr/src/app
COPY --from=builder node_modules .
COPY --from=builder dist ./dist
COPY entrypoint.sh .
COPY databases/*.sql databases/
EXPOSE 8080
CMD ./entrypoint.sh
CMD ./entrypoint.sh