add node based build

This commit is contained in:
OCram85 2021-12-30 20:33:44 +01:00
parent 759fd2b008
commit 92ecb2434c
3 changed files with 2747 additions and 3 deletions

View File

@ -1,11 +1,12 @@
FROM klakegg/hugo:0.91.1-ext-alpine-ci as builder
FROM node:lts-buster-slim as builder
COPY . /src
#RUN ls -la
WORKDIR /src
#RUN ls -a
RUN hugo --gc --minify
RUN npm install \
&& npm run build
FROM caddy:2.4.5-alpine
FROM caddy:2.4.6-alpine
LABEL maintainer="marco.blessing@googlemail.com"
COPY --from=builder src/public /usr/share/caddy/
HEALTHCHECK --interval=15s --timeout=3s \

2710
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

33
package.json Normal file
View File

@ -0,0 +1,33 @@
{
"name": "ocram85.com-blog",
"version": "1.0.0",
"description": "A personal blog about PowerShell, Automation and more.",
"main": "index.js",
"scripts": {
"build": "exec-bin node_modules/.bin/hugo/hugo --gc --minify",
"check": "exec-bin node_modules/.bin/hugo/hugo version",
"clean": "rimraf public/",
"start": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender",
"server": "exec-bin node_modules/.bin/hugo/hugo server",
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo --skipHealthCheck"
},
"repository": {
"type": "git",
"url": "git+https://github.com/OCram85/Blog.git"
},
"author": "OCram85",
"license": "MIT",
"bugs": {
"url": "https://github.com/OCram85/Blog/issues"
},
"homepage": "https://github.com/OCram85/Blog#readme",
"devDependencies": {
"exec-bin": "^1.0.0",
"hugo-installer": "^3.1.0",
"rimraf": "^3.0.2"
},
"otherDependencies": {
"hugo": "0.91.1"
}
}