Compare commits
No commits in common. "d79608edbb7ca68b0a26f6c021a141373308081f" and "fe62ad5539bc94b242c30c2952bf4c115cc9abfd" have entirely different histories.
d79608edbb
...
fe62ad5539
24
.drone.yml
24
.drone.yml
@ -19,13 +19,6 @@ get:
|
|||||||
path: odit-git-bot
|
path: odit-git-bot
|
||||||
name: sshkey
|
name: sshkey
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: npm_url
|
|
||||||
get:
|
|
||||||
path: odit-npm-cache
|
|
||||||
name: url
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@ -36,12 +29,9 @@ steps:
|
|||||||
depends_on: ["clone"]
|
depends_on: ["clone"]
|
||||||
image: registry.odit.services/hub/library/node:19.7.0-alpine3.16
|
image: registry.odit.services/hub/library/node:19.7.0-alpine3.16
|
||||||
commands:
|
commands:
|
||||||
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@7.29.3
|
- npm config set registry http://npm-cache.drone.svc.cluster.local:8080 && npm i -g pnpm@7
|
||||||
- pnpm i
|
- pnpm i
|
||||||
- pnpm licenses:export
|
- pnpm licenses:export
|
||||||
environment:
|
|
||||||
NPM_REGISTRY_URL:
|
|
||||||
from_secret: npm_url
|
|
||||||
- name: push new licenses file to repo
|
- name: push new licenses file to repo
|
||||||
depends_on: ["run full license export"]
|
depends_on: ["run full license export"]
|
||||||
image: appleboy/drone-git-push
|
image: appleboy/drone-git-push
|
||||||
@ -62,8 +52,10 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
build_args:
|
build_args:
|
||||||
- NPM_REGISTRY_URL:
|
- NPM_REGISTRY_DOMAIN:
|
||||||
from_secret: npm_url
|
from_secret: npmjs_domain
|
||||||
|
- NPM_REGISTRY_TOKEN:
|
||||||
|
from_secret: npmjs_token
|
||||||
repo: lfk/frontend
|
repo: lfk/frontend
|
||||||
tags:
|
tags:
|
||||||
- dev
|
- dev
|
||||||
@ -89,8 +81,10 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
build_args:
|
build_args:
|
||||||
- NPM_REGISTRY_URL:
|
- NPM_REGISTRY_DOMAIN:
|
||||||
from_secret: npm_url
|
from_secret: npmjs_domain
|
||||||
|
- NPM_REGISTRY_TOKEN:
|
||||||
|
from_secret: npmjs_token
|
||||||
repo: lfk/frontend
|
repo: lfk/frontend
|
||||||
tags:
|
tags:
|
||||||
- "${DRONE_TAG}"
|
- "${DRONE_TAG}"
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -1,15 +1,11 @@
|
|||||||
FROM registry.odit.services/hub/library/node:19.7.0-alpine3.16 as build
|
FROM registry.odit.services/hub/library/node:19.7.0-alpine3.16 as build
|
||||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY package.json ./
|
||||||
|
RUN npx pnpm@7 i
|
||||||
COPY package.json pnpm-lock.yaml *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./
|
COPY package.json pnpm-lock.yaml *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./
|
||||||
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@7.29.3
|
|
||||||
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i
|
|
||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
RUN pnpm build
|
RUN npm run build
|
||||||
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
FROM registry.odit.services/library/nginx-brotli:3.15 as final
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user