switch to pnpm
This commit is contained in:
parent
542591342b
commit
c0d137b4b4
|
@ -5,3 +5,4 @@ dist
|
|||
.git
|
||||
.vscode
|
||||
.docker
|
||||
.pnpm-store
|
||||
|
|
|
@ -16,17 +16,21 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Yarn packages
|
||||
run: yarn install
|
||||
- name: Install packages
|
||||
run: pnpm i
|
||||
|
||||
- name: Run ESLint
|
||||
run: yarn lint
|
||||
run: pnpm run lint
|
||||
|
||||
building:
|
||||
name: Build project
|
||||
|
@ -36,17 +40,21 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Yarn packages
|
||||
run: yarn install
|
||||
- name: Install packages
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Project
|
||||
run: yarn build
|
||||
run: pnpm build
|
||||
|
||||
docker:
|
||||
name: Build docker
|
||||
|
|
|
@ -2,3 +2,4 @@ node_modules
|
|||
.env
|
||||
config.json
|
||||
dist
|
||||
.pnpm-store
|
||||
|
|
15
Dockerfile
15
Dockerfile
|
@ -1,16 +1,21 @@
|
|||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# install dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
# install packages
|
||||
COPY package.json ./
|
||||
COPY pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
# build source
|
||||
COPY . ./
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
|
||||
# start server
|
||||
EXPOSE 80
|
||||
ENV MWB_SERVER__PORT=80
|
||||
ENV NODE_ENV=production
|
||||
CMD ["npm", "run", "start"]
|
||||
CMD ["pnpm", "run", "start"]
|
||||
|
|
|
@ -20,7 +20,7 @@ Backend for movie-web
|
|||
- [ ] user count
|
||||
- [ ] provider metrics
|
||||
- [ ] ratelimits (stored in redis)
|
||||
- [ ] switch to pnpm
|
||||
- [X] switch to pnpm
|
||||
- [ ] think of privacy centric method of auth
|
||||
- [ ] Register
|
||||
- [ ] Login
|
||||
|
|
|
@ -5,5 +5,7 @@ WORKDIR /app
|
|||
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.3/wait /wait
|
||||
RUN chmod +x /wait
|
||||
|
||||
RUN npm i -g pnpm
|
||||
|
||||
VOLUME [ "/app" ]
|
||||
CMD npm i && /wait && npm run dev
|
||||
CMD pnpm i && /wait && pnpm dev
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,8 @@
|
|||
"lint": "eslint --ext .ts,.js,.json,.tsx src/",
|
||||
"lint:fix": "eslint --fix --ext .ts,.js,.json,.tsx src/",
|
||||
"build:pre": "rimraf dist/",
|
||||
"build:compile": "tsc && tsc-alias"
|
||||
"build:compile": "tsc && tsc-alias",
|
||||
"preinstall": "npx -y only-allow pnpm"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jsonwebtoken": "^9.0.4",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue