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