Added dockerfile and docker-compose

This commit is contained in:
Nicolai Ort 2021-03-02 18:22:59 +01:00
parent 9b5c0b8f06
commit c0c8046031
2 changed files with 25 additions and 0 deletions

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
# Typescript Build
FROM registry.odit.services/mirror/node:14.15.1-alpine3.12
WORKDIR /app
COPY package.json ./
RUN npm i -g pnpm
RUN pnpm i
COPY tsconfig.json ./
COPY src ./src
RUN pnpm run build
# final image
FROM registry.odit.services/mirror/node:14.15.1-alpine3.12
COPY package.json ./
RUN npm i -g pnpm
RUN pnpm i --prod
COPY --from=0 /app/dist dist
ENTRYPOINT ["node", "dist/app.js"]

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: "3"
services:
mailer:
build: .
ports:
- 4010:4010
environment:
APP_PORT: 4010
NODE_ENV: production