Skip to content

Commit d59914d

Browse files
committed
feat: make api docs visible from docker compose
1 parent 14d4608 commit d59914d

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

docs/Dockerfile

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
1+
FROM python:3.11-slim AS builder
2+
3+
RUN apt-get update && apt-get install -y git make curl
4+
5+
COPY scripts/script-requirements.txt /scripts/script-requirements.txt
6+
COPY docs docs
7+
COPY scripts/docs/ /docs
8+
COPY gooddata-api-client /gooddata-api-client
9+
COPY gooddata-sdk /gooddata-sdk
10+
COPY gooddata-pandas /gooddata-pandas
11+
12+
RUN pip install -r /scripts/script-requirements.txt
13+
14+
WORKDIR /docs
15+
16+
RUN python json_builder.py
17+
RUN python python_ref_builder.py api_spec.toml data.json latest content/en
18+
RUN mkdir versioned_docs/latest
19+
RUN mv -f data.json ./versioned_docs/latest/data.json
20+
RUN mv -f content/en/latest/links.json ./versioned_docs/latest/links.json
21+
122
FROM node:20.18.0-bookworm-slim
223

24+
COPY --from=builder /docs /docs
25+
326
RUN apt-get update && \
427
apt-get install -y git make golang-go curl && \
528
npm install -g hugo-extended@0.117.0 && \
629
apt-get clean && \
730
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
831

9-
COPY docs docs
10-
11-
WORKDIR docs
32+
WORKDIR /docs
1233
RUN npm install
1334

1435
# accessible on http://localhost:1313/latest/

docs/config/_default/params.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
# - "latestTag" - docker image tag for the latest patch version. Must be changed
88
# on every patch release of respective branch
99

10+
[[versions]]
11+
version = "Latest"
12+
dirpath = "latest"
13+
url = "/latest/"
14+
productName = "Python SDK Latest"

docs/config/public/params.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# - "latestTag" - docker image tag for the latest patch version. Must be changed
88
# on every patch release of respective branch
99

10-
#[[versions]]
11-
# version = "Latest"
12-
# dirpath = "latest"
13-
# url = "/latest/"
14-
# productName = "Python SDK Latest"
10+
[[versions]]
11+
version = "Latest"
12+
dirpath = "latest"
13+
url = "/latest/"
14+
productName = "Python SDK Latest"

0 commit comments

Comments
 (0)