mirror of
https://github.com/sussy-code/backend.git
synced 2026-01-11 20:10:18 +00:00
switch to pnpm
This commit is contained in:
parent
542591342b
commit
c0d137b4b4
10 changed files with 2829 additions and 4780 deletions
|
|
@ -5,3 +5,4 @@ dist
|
|||
.git
|
||||
.vscode
|
||||
.docker
|
||||
.pnpm-store
|
||||
|
|
|
|||
28
.github/workflows/linting_testing.yml
vendored
28
.github/workflows/linting_testing.yml
vendored
|
|
@ -15,18 +15,22 @@ jobs:
|
|||
steps:
|
||||
- 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
|
||||
|
|
@ -35,18 +39,22 @@ jobs:
|
|||
steps:
|
||||
- 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
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@ node_modules
|
|||
.env
|
||||
config.json
|
||||
dist
|
||||
.pnpm-store
|
||||
|
|
|
|||
1
.npmrc
Normal file
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
shamefully-hoist=true
|
||||
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
|
||||
|
|
|
|||
4762
package-lock.json
generated
4762
package-lock.json
generated
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",
|
||||
|
|
|
|||
2792
pnpm-lock.yaml
Normal file
2792
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue