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 \
|
RUN apk update \
|
||||||
&& apk upgrade \
|
&& apk upgrade \
|
||||||
&& apk add --no-cache bash git openssh make
|
&& apk add --no-cache bash git openssh
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ RUN npm install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make build \
|
RUN npm run build \
|
||||||
&& npm prune --production \
|
&& npm prune --production \
|
||||||
&& apk del bash git openssh
|
&& apk del bash git openssh
|
||||||
|
|
||||||
EXPOSE 30000
|
EXPOSE 30000
|
||||||
|
|
||||||
CMD make start
|
CMD npm run start
|
||||||
|
|
4
makefile
4
makefile
|
@ -7,13 +7,13 @@ watch:
|
||||||
build: ts
|
build: ts
|
||||||
|
|
||||||
start:
|
start:
|
||||||
node target/scripts/main.mjs
|
npm run start
|
||||||
|
|
||||||
hr:
|
hr:
|
||||||
deno run -A ~/sandbox/hr/server.ts target static
|
deno run -A ~/sandbox/hr/server.ts target static
|
||||||
|
|
||||||
ts:
|
ts:
|
||||||
npx tsc
|
npm run build
|
||||||
|
|
||||||
ts-w:
|
ts-w:
|
||||||
NODE_ENV=develop npx tsc-watch --onSuccess "make start"
|
NODE_ENV=develop npx tsc-watch --onSuccess "make start"
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{
|
{
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"start": "node target/scripts/main.mjs"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^17.0.21",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
||||||
|
|
Loading…
Reference in a new issue