From f5461b5420a9bf2d22bc16ddacfeb577350d6f06 Mon Sep 17 00:00:00 2001 From: Paul Munteanu Date: Sat, 29 May 2021 21:36:19 +0300 Subject: [PATCH] Compile TS during Docker image build --- Dockerfile | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b2329233..48f9dd36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,6 @@ RUN apk --no-cache --virtual build-dependencies add \ RUN npm install RUN apk del build-dependencies COPY . . +RUN npm run build EXPOSE 3002 CMD ["npm", "start"] \ No newline at end of file diff --git a/package.json b/package.json index c5f3df24..c50fcbc5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "npm run build && node dist/", + "start": "node dist/", "build": "npx tsc -b .", "dev": "tsnd --respawn src/index.ts" },