Switched to npm cache for build
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3c94706fee
commit
e5be5ae4d5
13
.drone.yml
13
.drone.yml
@ -12,6 +12,13 @@ get:
|
|||||||
path: odit-registry-builder
|
path: odit-registry-builder
|
||||||
name: password
|
name: password
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: npm_url
|
||||||
|
get:
|
||||||
|
path: odit-npm-cache
|
||||||
|
name: url
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@ -25,10 +32,8 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
build_args:
|
build_args:
|
||||||
- NPM_REGISTRY_DOMAIN:
|
- NPM_REGISTRY_URL:
|
||||||
from_secret: npmjs_domain
|
from_secret: npm_url
|
||||||
- NPM_REGISTRY_TOKEN:
|
|
||||||
from_secret: npmjs_token
|
|
||||||
repo: lfk/docs
|
repo: lfk/docs
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
FROM registry.odit.services/hub/library/node:16.15.1-alpine3.16 AS build
|
FROM registry.odit.services/hub/library/node:16.15.1-alpine3.16 AS build
|
||||||
|
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json *.config.cjs *.config.js ./
|
COPY package.json *.config.cjs *.config.js ./
|
||||||
RUN npm config set registry https://$NPM_REGISTRY_DOMAIN && npm config set //$NPM_REGISTRY_DOMAIN/:_authToken $NPM_REGISTRY_TOKEN
|
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@7.29.3
|
||||||
RUN npm i -g pnpm && pnpm i
|
RUN pnpm i
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/library/nginx-brotli:3.15.130
|
FROM registry.odit.services/library/nginx-brotli:3.15.130
|
||||||
COPY --from=build /app/src/.vuepress/dist /usr/share/nginx/html
|
COPY --from=build /app/src/.vuepress/dist /usr/share/nginx/html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user