mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
.
This commit is contained in:
7
producer/Dockerfile
Normal file
7
producer/Dockerfile
Normal 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"]
|
||||
@@ -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",
|
||||
|
||||
7
producer/scripts/prepare_docker.js
Normal file
7
producer/scripts/prepare_docker.js
Normal 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()); });
|
||||
Reference in New Issue
Block a user