Files
conductor-oss--conductor/docker/server/Dockerfile
Andrew Lai (AJ) 9bfa635d4a Add frontend code coverage and fix LLM Chat/Text tasks (#1461)
* Add frontend code coverage

* Revert LLM task forms to correct version and add tests

* Fix CI heap out of memory

* Add OPENAI_API_KEY to env for test

* - Update slack icon for coverage report
- Make tests more stable

* Set slack icon back to hidden based on flag

* - Fix coverage report
- Try and improve CI speed

* Add better placeholder and helper text for Chat Complete task

* Make instructions take priority over system messages if instructions are provided

* Improve LLM chat complete UX so it's less confusing - Enterprise you either select a prompt OR provide instructions

* Rename field to Prompt Template instead of AI Prompt and increase spacing from label
2026-08-04 14:47:09 -07:00

91 lines
3.1 KiB
Docker

#
# conductor:server - Conductor Server + UI
#
# Build args:
# PREBUILT=true: Skips both JAR and UI builds, uses pre-built artifacts (CI multi-arch)
# SKIP_UI=true: Skips only the UI build (E2E CI — tests serve UI from the host)
# Default: Builds JAR and UI from source (docker-compose, local dev)
#
# ===========================================================================================================
# 0. Builder stage
# ===========================================================================================================
FROM azul/zulu-openjdk-debian:21 AS builder
ARG PREBUILT=false
ARG INDEXING_BACKEND=elasticsearch
LABEL maintainer="Orkes OSS <oss@orkes.io>"
COPY . /conductor
WORKDIR /conductor
RUN if [ "$PREBUILT" = "true" ]; then \
rm -rf server/build/libs && mkdir -p server/build/libs && \
cp docker/server/libs/conductor-server.jar server/build/libs/conductor-server-boot.jar && \
echo "Using pre-built server JAR"; \
else \
./gradlew build -x test -x spotlessCheck -x shadowJar \
-PindexingBackend=${INDEXING_BACKEND} \
-Dorg.gradle.jvmargs=-Xmx2g \
--no-daemon --no-parallel; \
fi
# ===========================================================================================================
# 1. UI builder stage
# ===========================================================================================================
FROM node:lts AS ui-builder
ARG PREBUILT=false
ARG SKIP_UI=false
LABEL maintainer="Orkes OSS <oss@orkes.io>"
COPY ui-next /conductor/ui-next
WORKDIR /conductor/ui-next
RUN if [ "$SKIP_UI" = "true" ]; then \
mkdir -p dist && echo "UI build skipped (SKIP_UI=true)"; \
elif [ "$PREBUILT" = "false" ]; then \
corepack enable && \
pnpm install && \
NODE_OPTIONS=--max-old-space-size=4096 pnpm build; \
else \
echo "Using pre-built UI assets"; \
fi
# ===========================================================================================================
# 2. Final stage
# ===========================================================================================================
FROM debian:stable-slim
LABEL maintainer="Orkes OSS <oss@orkes.io>"
RUN apt-get update \
&& apt-get install -y --no-install-recommends openjdk-21-jre-headless nginx curl ca-certificates \
&& rm -f /etc/nginx/sites-enabled/default \
&& rm -rf /var/lib/apt/lists/*
# Make app folders
RUN mkdir -p /app/config /app/logs /app/libs
# Copy the compiled output to new image
COPY docker/server/bin /app
COPY docker/server/config /app/config
COPY --from=builder /conductor/server/build/libs/*boot*.jar /app/libs/conductor-server.jar
# Copy compiled UI assets to nginx www directory
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=ui-builder /conductor/ui-next/dist .
COPY docker/server/nginx/nginx.conf /etc/nginx/conf.d/default.conf
# Copy the files for the server into the app folders
RUN chmod +x /app/startup.sh
HEALTHCHECK --interval=60s --timeout=30s --retries=10 CMD curl -I -XGET http://localhost:8080/health || exit 1
CMD [ "/app/startup.sh" ]
ENTRYPOINT [ "/bin/sh"]