fix: scripts for docker image

This commit is contained in:
Dmitriy Pleshevskiy 2022-03-22 10:57:13 +03:00
parent c111333c0d
commit c7e49a066f
3 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@ WORKDIR /app
RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash git openssh make
&& apk add --no-cache bash git openssh
COPY package*.json ./
@ -13,10 +13,10 @@ RUN npm install
COPY . .
RUN make build \
RUN npm run build \
&& npm prune --production \
&& apk del bash git openssh
EXPOSE 30000
CMD make start
CMD npm run start

View File

@ -7,13 +7,13 @@ watch:
build: ts
start:
node target/scripts/main.mjs
npm run start
hr:
deno run -A ~/sandbox/hr/server.ts target static
ts:
npx tsc
npm run build
ts-w:
NODE_ENV=develop npx tsc-watch --onSuccess "make start"

View File

@ -1,4 +1,8 @@
{
"scripts": {
"build": "tsc",
"start": "node target/scripts/main.mjs"
},
"devDependencies": {
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.14.0",