Compare commits

...

4 Commits

Author SHA1 Message Date
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
7 changed files with 156 additions and 2 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

@ -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

@ -2,7 +2,7 @@
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 AS build
WORKDIR /app
COPY package.json ./
RUN npm i -g pnpm
RUN npm i -g pnpm@7.29.3
RUN pnpm i
COPY tsconfig.json ./
COPY src ./src
@ -40,4 +40,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": {

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