From 5e7771c4ac79384515c6a3457d1f1884e8433895 Mon Sep 17 00:00:00 2001 From: Paul Munteanu Date: Sat, 29 May 2021 21:35:39 +0300 Subject: [PATCH] Compile TS during Docker image build --- Dockerfile | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1113978f..39986e72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ FROM node:lts-alpine WORKDIR /usr/src/fosscord-api -COPY package.json . +COPY package.json . RUN npm install RUN npx patch-package COPY . . EXPOSE 3001 +RUN npm run build CMD ["npm", "start"] \ No newline at end of file diff --git a/package.json b/package.json index 0f651646..a3160391 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "test": "jest", "test:watch": "jest --watch", - "start": "npm run build && node dist/start", + "start": "node dist/start", "build": "tsc -b .", "dev": "tsnd --respawn src/start.ts" },