Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions deploy/api-reference/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM nginxinc/nginx-unprivileged:mainline-alpine-slim

# Switch to root to install packages
USER root


# Install JDK, curl, git
RUN apk add --no-cache openjdk17 curl git

# Copy the project
# NOTE: expecting the context to be the project root
COPY . /repo

# Build the API reference
WORKDIR /repo
RUN ./gradlew :dokkaGenerate

# Copy built site to nginx html directory
RUN cp -r /repo/build/dokka/html/* /usr/share/nginx/html/

# Remove the cloned repository
RUN rm -rf /repo


# Switch back to nginx user
USER nginx

WORKDIR /usr/share/nginx/html
29 changes: 29 additions & 0 deletions deploy/api-reference/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: api-reference-deployment
build:
tagPolicy:
sha256: {}
artifacts:
- image: registry.jetbrains.team/p/ai-development-kit/containers/api-reference-deployment
context: ../../ # Root of the project
docker:
dockerfile: deploy/api-reference/Dockerfile
local:
useDockerCLI: false
useBuildkit: true
deploy:
helm:
releases:
- name: api-reference-deployment # Will clash with other apps in one namespace, so please change for each new app
remoteChart: oci://registry.jetbrains.team/p/cb/helm-charts/simple-app
upgradeOnChange: true
version: 0.3.2
setValueTemplates:
image: "{{.IMAGE_FULLY_QUALIFIED}}"
imagePullSecret: "{{.IMAGE_PULL_SECRET}}"
applicationName: "{{.APPLICATION_NAME}}"
valuesFiles:
- values.yaml
10 changes: 10 additions & 0 deletions deploy/api-reference/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
containerPort: 8080
health:
path: /
runAsUser: 101
runAsGroup: 101
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 8
33 changes: 33 additions & 0 deletions deploy/documentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM nginxinc/nginx-unprivileged:mainline-alpine-slim

# Switch to root to install packages
USER root


# Install Python 3.11 and curl
RUN apk add --no-cache python3 py3-pip curl git

# Install uv & add it to PATH
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

# Copy the project
# NOTE: expecting the context to be the project root
COPY . /repo

# Build the documentation
WORKDIR /repo/docs
RUN uv sync --frozen --all-extras
RUN uv run mkdocs build

# Copy built site to nginx html directory
RUN cp -r /repo/docs/site/* /usr/share/nginx/html/

# Remove the cloned repository
RUN rm -rf /repo


# Switch back to nginx user
USER nginx

WORKDIR /usr/share/nginx/html
29 changes: 29 additions & 0 deletions deploy/documentation/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: documentation-deployment
build:
tagPolicy:
sha256: {}
artifacts:
- image: registry.jetbrains.team/p/ai-development-kit/containers/documentation-deployment
context: ../../ # Root of the project
docker:
dockerfile: deploy/documentation/Dockerfile
local:
useDockerCLI: false
useBuildkit: true
deploy:
helm:
releases:
- name: documentation-deployment # Will clash with other apps in one namespace, so please change for each new app
remoteChart: oci://registry.jetbrains.team/p/cb/helm-charts/simple-app
upgradeOnChange: true
version: 0.3.2
setValueTemplates:
image: "{{.IMAGE_FULLY_QUALIFIED}}"
imagePullSecret: "{{.IMAGE_PULL_SECRET}}"
applicationName: "{{.APPLICATION_NAME}}"
valuesFiles:
- values.yaml
10 changes: 10 additions & 0 deletions deploy/documentation/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
containerPort: 8080
health:
path: /
runAsUser: 101
runAsGroup: 101
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 8