This commit is contained in:
Emily
2024-06-25 00:52:12 +02:00
parent 1414451d2b
commit f369880ba7
5 changed files with 37 additions and 7 deletions

7
producer/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM node:21-alpine
WORKDIR /home/app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install --prod --frozen-lockfile
COPY ./dist /home/app/dist
EXPOSE ${PORT}
CMD ["node", "dist/producer/src/index.js"]

View File

@@ -20,7 +20,8 @@
"dev": "node scripts/start_dev.js",
"compile": "tsc",
"build": "ts-node scripts/build.ts",
"build_all": "npm run compile && npm run build"
"build_all": "npm run compile && npm run build",
"docker-build": "node scripts/prepare_docker.js && docker build -t litlyx-producer ."
},
"keywords": [],
"author": "Emily",

View File

@@ -0,0 +1,7 @@
const child = require('child_process');
const p = child.exec('pnpm run compile && pnpm run build');
p.stdout.on('data', (e) => { console.log(e.toString()); });
p.stderr.on('data', (e) => { console.log(e.toString()); });