Compare commits

..

6 Commits

Author SHA1 Message Date
6fe82686f2
Drone -> Kaniko
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-10-10 17:05:21 +02:00
e544df0e19
Ignore pnpm lock 2022-10-10 17:03:13 +02:00
fbe8136be2
Added dockerignore 2022-10-10 17:02:41 +02:00
8cc14c7a26
Docker bump 2022-10-10 17:02:34 +02:00
93b442790e
Dependency bump 2022-10-10 17:00:32 +02:00
c1fc13ba29
Bumped image dependencies 2022-10-10 16:52:24 +02:00
5 changed files with 164 additions and 34 deletions

140
.dockerignore Normal file
View File

@ -0,0 +1,140 @@
# ---> 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

View File

@ -12,48 +12,33 @@ get:
path: odit-registry-builder
name: password
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: pipeline
type: kubernetes
name: build:latest
steps:
- name: run full license export
depends_on: ["clone"]
image: node:alpine
commands:
- yarn
- yarn licenses:export
- name: push new licenses file to repo
depends_on: ["run full license export"]
image: appleboy/drone-git-push
settings:
branch: main
commit: true
commit_message: new license file version [CI SKIP]
author_email: bot@odit.services
remote: git@git.odit.services:lfk/docs.git
ssh_key:
from_secret: git_ssh
- name: build latest
image: plugins/docker
depends_on: [clone]
- name: docker release
image: registry.odit.services/library/drone-kaniko
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/docs
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/docs
tags:
- latest
cache: true
registry: registry.odit.services
mtu: 1000
trigger:
branch:
- main

1
.gitignore vendored
View File

@ -138,3 +138,4 @@ build
lib
/oss-attribution
*.tmp
pnpm-lock.yaml

View File

@ -1,10 +1,11 @@
FROM node:15.5.1-alpine3.12 AS build
FROM registry.odit.services/hub/library/node:16.15.1-alpine3.16 AS build
WORKDIR /app
COPY package.json ./
RUN yarn
COPY package.json *.config.cjs *.config.js ./
RUN npm config set registry https://$NPM_REGISTRY_DOMAIN && npm config set //$NPM_REGISTRY_DOMAIN/:_authToken $NPM_REGISTRY_TOKEN
RUN npm i -g pnpm && pnpm i
COPY . ./
RUN yarn build
RUN pnpm build
# final image
FROM fholzer/nginx-brotli:v1.19.1 AS final
FROM registry.odit.services/library/nginx-brotli:3.15.130
COPY --from=build /app/src/.vuepress/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf

View File

@ -31,11 +31,14 @@
},
"license": "CC-BY-NC-SA-4.0",
"devDependencies": {
"@odit/license-exporter": "0.0.11",
"vuepress": "1.8.2"
"@odit/license-exporter": "0.0.12",
"vuepress": "1.9.7"
},
"dependencies": {
"vuepress-plugin-flexsearch": "0.1.0",
"vuepress-plugin-flexsearch": "0.3.0",
"vuepress-theme-default-prefers-color-scheme": "2.0.0"
},
"volta": {
"node": "18.10.0"
}
}