forked from github-starred/komodo
* UI Tags: remove owner column * 2.3.2 * reporting error includes api message * fix server builder config deserialization issue when server_ids not specified (causing UI failure) * deploy 2.3.2-dev-1 * bump rs / ui dependencies. Breaking fixes: clap (rust), react table (ts), recharts (ts) * improve ui index file from 4.7mb to 1.4mb with proper code splitting * mogh ui 1.0.1 lock * deploy 2.3.2-dev-2 * fix monaco yaml web worker for compose file suggestions * small fix various console logs * deploy 2.3.2-dev-3 * docsite configurable DOCSITE_URL and DOCSITE_BASE_URL * align dockerfile with base url changes * fix docsite docker caddy * 2.3.2 * remove currently unsupported configuration (github webhook app) * bump rust deps again * bump react table
40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
FROM node:22.12-alpine AS builder
|
|
|
|
ARG DOCSITE_URL
|
|
ARG DOCSITE_BASE_URL=/
|
|
|
|
WORKDIR /builder
|
|
|
|
COPY package.json yarn.lock ./
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
COPY ./docs ./docs
|
|
COPY ./src ./src
|
|
COPY ./static ./static
|
|
COPY ./babel.config.js ./babel.config.js
|
|
COPY ./docusaurus.config.ts ./docusaurus.config.ts
|
|
COPY ./sidebars.ts ./sidebars.ts
|
|
COPY ./tsconfig.json ./tsconfig.json
|
|
|
|
RUN DOCSITE_URL=${DOCSITE_URL} DOCSITE_BASE_URL=${DOCSITE_BASE_URL} yarn build
|
|
|
|
FROM caddy:latest
|
|
|
|
ARG DOCSITE_BASE_URL=/
|
|
|
|
# Copy into caddy image /srv, nested under the base url path
|
|
COPY --from=builder /builder/build /srv${DOCSITE_BASE_URL}
|
|
|
|
# Add a basic caddyfile serving http.
|
|
# BASE is the base url without its trailing slash (empty when base url is "/"),
|
|
# used to redirect e.g. /komodo -> /komodo/ so relative urls resolve correctly.
|
|
RUN BASE="${DOCSITE_BASE_URL%/}" && cat > /etc/caddy/Caddyfile <<EOF
|
|
:80 {
|
|
root * /srv
|
|
${BASE:+redir $BASE $BASE/ 308}
|
|
file_server
|
|
try_files {path} {path}.html ${DOCSITE_BASE_URL}index.html
|
|
}
|
|
EOF
|
|
|
|
EXPOSE 80 |