fix: scripts for docker image
This commit is contained in:
parent
c111333c0d
commit
c7e49a066f
3 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
4
makefile
4
makefile
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue