11 Commits
v0.6.1 ... dev

Author SHA1 Message Date
8f3faee573 Revert "updated templates"
This reverts commit 6ff2ba702b.
2024-12-02 15:57:04 +01:00
6ff2ba702b updated templates 2024-11-21 17:51:23 +01:00
4ecefe8534 fix(ci): Switched to non-drone env vars 2024-02-13 17:25:07 +01:00
ab9295ee23 Frozen lockfile instead of offline
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 20:15:10 +02:00
29d4e21656 lockfile 2023-03-29 20:12:06 +02:00
490f24422b Switched docker over to pnpm w/cache 2023-03-29 20:11:55 +02:00
67eb761a99 switched ci to pnpm cache 2023-03-29 20:10:34 +02:00
22978e5bbc 🚀Bumped version to v0.6.2
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 14:02:13 +01:00
0dbd7311ab Added static img folder for directly serving images 2023-03-15 14:01:49 +01:00
cbda10e2a1 Added dockerignore for smaller build env 2023-03-15 13:56:53 +01:00
ee3c443216 Fixed docs not getting bundeled 2023-03-15 13:56:33 +01:00
9 changed files with 971 additions and 798 deletions

141
.dockerignore Normal file
View File

@@ -0,0 +1,141 @@
# ---> VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/i18n-ally-custom-framework.yml
*.code-workspace
# Local History for Visual Studio Code
.history/
# ---> Node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
yarn.lock
package-lock.json
build
*.sqlite
*.sqlite-jurnal
/docs
lib
/oss-attribution
*.tmp
*.pdf

View File

@@ -19,6 +19,13 @@ get:
path: odit-git-bot
name: sshkey
---
kind: secret
name: npm_url
get:
path: odit-npm-cache
name: url
---
kind: pipeline
type: kubernetes
@@ -30,7 +37,7 @@ steps:
- name: clone
image: alpine/git
commands:
- git clone $DRONE_REMOTE_URL .
- git clone $CI_REPO_CLONE_URL .
- git checkout dev
- name: build dev
depends_on: ["clone"]
@@ -41,10 +48,8 @@ steps:
password:
from_secret: docker_password
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
- NPM_REGISTRY_URL:
from_secret: npm_url
repo: lfk/document-server
tags:
- dev
@@ -67,7 +72,7 @@ steps:
- name: clone
image: alpine/git
commands:
- git clone $DRONE_REMOTE_URL .
- git clone $CI_REPO_CLONE_URL .
- git checkout dev
- name: build dev
depends_on: ["clone"]
@@ -78,10 +83,8 @@ steps:
password:
from_secret: docker_password
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
- NPM_REGISTRY_URL:
from_secret: npm_url
repo: lfk/document-server
tags:
- latest
@@ -100,7 +103,7 @@ type: kubernetes
name: build:tags
steps:
- name: build $DRONE_TAG
- name: build $CI_COMMIT_TAG
depends_on: ["clone"]
image: registry.odit.services/library/drone-kaniko
settings:
@@ -109,13 +112,11 @@ steps:
password:
from_secret: docker_password
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
- NPM_REGISTRY_URL:
from_secret: npm_url
repo: lfk/document-server
tags:
- "${DRONE_TAG}"
- "${CI_COMMIT_TAG}"
cache: true
registry: registry.odit.services
trigger:

View File

@@ -2,10 +2,19 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [v0.6.2](https://git.odit.services/lfk/document-server/compare/v0.6.1...v0.6.2)
- Added dockerignore for smaller build env [`cbda10e`](https://git.odit.services/lfk/document-server/commit/cbda10e2a11ee467d44ed9c8a5c0c3e410ea0b33)
- Added static img folder for directly serving images [`0dbd731`](https://git.odit.services/lfk/document-server/commit/0dbd7311aba081003b75c91f277b49e8d5cb68d9)
- Fixed docs not getting bundeled [`ee3c443`](https://git.odit.services/lfk/document-server/commit/ee3c4432162a69be39f475f6a2db6c3a49af6c47)
#### [v0.6.1](https://git.odit.services/lfk/document-server/compare/v0.6.0...v0.6.1)
> 23 February 2023
- Dependency cleanup [`c21076a`](https://git.odit.services/lfk/document-server/commit/c21076a049484e353735db8542a932d93d0520c1)
- Dependency Bumps [`fc774d5`](https://git.odit.services/lfk/document-server/commit/fc774d5af39d7b6db999e85f2be8e109400cf862)
- 🚀Bumped version to v0.6.1 [`bbe01cd`](https://git.odit.services/lfk/document-server/commit/bbe01cd231a4fed897b3a30858d008506ad410be)
- Slimmed down docker build thx to copy [`10c68cf`](https://git.odit.services/lfk/document-server/commit/10c68cfb37025642688cde40cac69a8ff7f6c513)
#### [v0.6.0](https://git.odit.services/lfk/document-server/compare/v0.5.1...v0.6.0)

View File

@@ -1,14 +1,17 @@
# Typescript Build
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 AS build
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
WORKDIR /app
COPY package.json ./
RUN npm i -g pnpm
RUN pnpm i
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i
COPY tsconfig.json ./
COPY src ./src
RUN pnpm run build \
RUN pnpm build \
&& rm -rf /app/node_modules \
&& pnpm i --production --prefer-offline
&& pnpm i --production --frozen-lockfile
# final image
FROM registry.odit.services/hub/library/alpine:3.16
@@ -40,4 +43,5 @@ USER pptruser
COPY --from=build /app/package.json /app/
COPY --from=build /app/node_modules /app/node_modules
COPY --from=build /app/dist app
COPY ./src/static app/static
ENTRYPOINT ["node", "app/app.js"]

View File

@@ -5,6 +5,8 @@ services:
build: .
ports:
- 4010:4010
# volumes:
# - ./lelelelele.pdf:/app/app/static/img/lelelelele.pdf
environment:
APP_PORT: 4010
NODE_ENV: production

View File

@@ -1,6 +1,6 @@
{
"name": "@odit/lfk-document-server",
"version": "0.6.1",
"version": "0.6.2",
"description": "The document generation server for the LfK! runner system. This generates certificates, sponsoring aggreements and more",
"main": "src/app.ts",
"scripts": {

1569
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,5 +20,6 @@ export default async (app: Application) => {
res.json(spec);
});
app.use('/docs', express.static(path.join(__dirname, '../static/docs'), { index: "index.html", extensions: ['html'] }));
app.use('/img', express.static(path.join(__dirname, '../static/img')));
return app;
};

0
src/static/img/.gitkeep Normal file
View File