From 669c649c756c091ebbb53cbb7aeaa9dff840a149 Mon Sep 17 00:00:00 2001 From: Victor Chapaev Date: Sun, 16 Mar 2025 14:40:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++++++ build.sh | 3 +++ config/config.json | 15 +++++++++++++++ push.sh | 3 +++ run.sh | 3 +++ 5 files changed, 35 insertions(+) create mode 100644 Dockerfile create mode 100755 build.sh create mode 100644 config/config.json create mode 100755 push.sh create mode 100755 run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..df52a4e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM mydocker.ru/alpine-dev AS builder +RUN apk add --no-cache doxygen python3 py3-pip plantuml && \ + git clone -b v3.11.3 https://gitfox.ru/lib/json.git && \ + cd json && \ + cd /src/json/docs/mkdocs && \ + make install_venv build + +FROM mydocker.ru/unit +COPY --from=builder /src/json/docs/mkdocs/site /www +ADD ./config/ /app/config/ +EXPOSE 8080/tcp diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..df9f2a1 --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build . -t gitfox.ru/victor/json-cpp diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..48b3bc9 --- /dev/null +++ b/config/config.json @@ -0,0 +1,15 @@ +{ + "listeners": { + "*:8080": { + "pass": "routes" + } + }, + + "routes": [ + { + "action": { + "share": "/www$uri" + } + } + ] +} diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..4957400 --- /dev/null +++ b/push.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker push gitfox.ru/victor/json-cpp diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..b348c5e --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run -ti --rm -p 8080:8080 gitfox.ru/victor/json-cpp $*