Compare commits
No commits in common. "6275aaa326f1c02c8dd42aa31608978408c44ab7" and "16ce0a848050b74c4b6dd93f17e5a6e9024cdb7d" have entirely different histories.
6275aaa326
...
16ce0a8480
30
.drone.yml
30
.drone.yml
@ -26,13 +26,6 @@ get:
|
|||||||
path: odit-ci-bot
|
path: odit-ci-bot
|
||||||
name: apikey
|
name: apikey
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: npm_url
|
|
||||||
get:
|
|
||||||
path: odit-npm-cache
|
|
||||||
name: url
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
@ -48,9 +41,8 @@ steps:
|
|||||||
- name: run tests
|
- name: run tests
|
||||||
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
||||||
commands:
|
commands:
|
||||||
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
- yarn
|
||||||
- pnpm i
|
- yarn test:ci
|
||||||
- pnpm test:ci
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
@ -77,8 +69,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/backend
|
repo: lfk/backend
|
||||||
tags:
|
tags:
|
||||||
- dev
|
- dev
|
||||||
@ -115,8 +109,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/backend
|
repo: lfk/backend
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
@ -153,8 +149,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/backend
|
repo: lfk/backend
|
||||||
tags:
|
tags:
|
||||||
- "${DRONE_TAG}"
|
- "${DRONE_TAG}"
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -1,18 +1,15 @@
|
|||||||
# Typescript Build
|
# Typescript Build
|
||||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as build
|
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
||||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 && pnpm i
|
RUN npx pnpm@7.26.3 i
|
||||||
|
|
||||||
COPY tsconfig.json ormconfig.js ./
|
COPY tsconfig.json ormconfig.js ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN pnpm build
|
RUN npm run build
|
||||||
|
|
||||||
# final image
|
# final image
|
||||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as final
|
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
||||||
COPY package.json ormconfig.js ./
|
COPY package.json ormconfig.js ./
|
||||||
RUN npx pnpm@7.26.3 i --prod
|
RUN npx pnpm@7.26.3 i --prod
|
||||||
COPY --from=build /app/dist dist
|
COPY --from=0 /app/dist dist
|
||||||
ENTRYPOINT ["node", "dist/app.js"]
|
ENTRYPOINT ["node", "dist/app.js"]
|
@ -3,9 +3,6 @@
|
|||||||
"version": "0.14.3",
|
"version": "0.14.3",
|
||||||
"main": "src/app.ts",
|
"main": "src/app.ts",
|
||||||
"repository": "https://git.odit.services/lfk/backend",
|
"repository": "https://git.odit.services/lfk/backend",
|
||||||
"engines": {
|
|
||||||
"pnpm": "8.0.0"
|
|
||||||
},
|
|
||||||
"author": {
|
"author": {
|
||||||
"name": "ODIT.Services",
|
"name": "ODIT.Services",
|
||||||
"email": "info@odit.services",
|
"email": "info@odit.services",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user