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
|
||||
name: apikey
|
||||
|
||||
---
|
||||
kind: secret
|
||||
name: npm_url
|
||||
get:
|
||||
path: odit-npm-cache
|
||||
name: url
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@ -48,9 +41,8 @@ steps:
|
||||
- name: run tests
|
||||
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
||||
commands:
|
||||
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
||||
- pnpm i
|
||||
- pnpm test:ci
|
||||
- yarn
|
||||
- yarn test:ci
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
@ -77,8 +69,10 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
repo: lfk/backend
|
||||
tags:
|
||||
- dev
|
||||
@ -115,8 +109,10 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
repo: lfk/backend
|
||||
tags:
|
||||
- latest
|
||||
@ -153,8 +149,10 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
repo: lfk/backend
|
||||
tags:
|
||||
- "${DRONE_TAG}"
|
||||
|
13
Dockerfile
13
Dockerfile
@ -1,18 +1,15 @@
|
||||
# Typescript Build
|
||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as build
|
||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
|
||||
WORKDIR /app
|
||||
|
||||
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 src ./src
|
||||
RUN pnpm build
|
||||
RUN npm run build
|
||||
|
||||
# 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 ./
|
||||
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"]
|
@ -3,9 +3,6 @@
|
||||
"version": "0.14.3",
|
||||
"main": "src/app.ts",
|
||||
"repository": "https://git.odit.services/lfk/backend",
|
||||
"engines": {
|
||||
"pnpm": "8.0.0"
|
||||
},
|
||||
"author": {
|
||||
"name": "ODIT.Services",
|
||||
"email": "info@odit.services",
|
||||
|
Loading…
x
Reference in New Issue
Block a user