- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
123 lines
4.0 KiB
Docker
123 lines
4.0 KiB
Docker
FROM node:20.19-bullseye-slim AS base
|
|
|
|
# Set environment variables early for better layer caching
|
|
ENV LANG=en_US.UTF-8 \
|
|
LANGUAGE=en_US:en \
|
|
LC_ALL=en_US.UTF-8 \
|
|
NX_DAEMON=false \
|
|
NX_NO_CLOUD=true
|
|
|
|
# Install all system dependencies in a single layer with cache mounts
|
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
openssh-client \
|
|
python3 \
|
|
g++ \
|
|
build-essential \
|
|
git \
|
|
poppler-utils \
|
|
poppler-data \
|
|
procps \
|
|
locales \
|
|
locales-all \
|
|
unzip \
|
|
curl \
|
|
ca-certificates \
|
|
libcap-dev && \
|
|
yarn config set python /usr/bin/python3
|
|
|
|
RUN export ARCH=$(uname -m) && \
|
|
if [ "$ARCH" = "x86_64" ]; then \
|
|
curl -fSL https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-linux-x64-baseline.zip -o bun.zip; \
|
|
elif [ "$ARCH" = "aarch64" ]; then \
|
|
curl -fSL https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-linux-aarch64.zip -o bun.zip; \
|
|
fi
|
|
|
|
RUN unzip bun.zip \
|
|
&& mv bun-*/bun /usr/local/bin/bun \
|
|
&& chmod +x /usr/local/bin/bun \
|
|
&& rm -rf bun.zip bun-*
|
|
|
|
RUN bun --version
|
|
|
|
# Install global npm packages in a single layer
|
|
RUN --mount=type=cache,target=/root/.npm \
|
|
npm install -g --no-fund --no-audit \
|
|
node-gyp \
|
|
npm@9.9.3 \
|
|
pm2@6.0.10 \
|
|
typescript@4.9.4
|
|
|
|
# Install isolated-vm globally (needed for sandboxes)
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
cd /usr/src && bun install isolated-vm@5.0.1
|
|
|
|
### STAGE 1: Build ###
|
|
FROM base AS build
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy only dependency files first for better layer caching
|
|
COPY .npmrc package.json bun.lock ./
|
|
|
|
# Install all dependencies with frozen lockfile
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
bun install --frozen-lockfile
|
|
|
|
# Copy source code after dependency installation
|
|
COPY . .
|
|
|
|
# Build all projects including the SmoothSchedule piece
|
|
RUN npx nx run-many --target=build --projects=react-ui,server-api,pieces-smoothschedule --configuration production --parallel=2 --skip-nx-cache
|
|
|
|
# Install production dependencies only for the backend API
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
cd dist/packages/server/api && \
|
|
bun install --production --frozen-lockfile
|
|
|
|
# Install dependencies for the SmoothSchedule piece
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
cd dist/packages/pieces/community/smoothschedule && \
|
|
bun install --production
|
|
|
|
### STAGE 2: Run ###
|
|
FROM base AS run
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install Nginx and gettext in a single layer with cache mount
|
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends nginx gettext
|
|
|
|
# Copy static configuration files first (better layer caching)
|
|
COPY nginx.react.conf /etc/nginx/nginx.conf
|
|
COPY --from=build /usr/src/app/packages/server/api/src/assets/default.cf /usr/local/etc/isolate
|
|
COPY docker-entrypoint.sh .
|
|
|
|
# Create all necessary directories in one layer
|
|
RUN mkdir -p \
|
|
/usr/src/app/dist/packages/server \
|
|
/usr/src/app/dist/packages/engine \
|
|
/usr/src/app/dist/packages/shared \
|
|
/usr/src/app/dist/packages/pieces && \
|
|
chmod +x docker-entrypoint.sh
|
|
|
|
# Copy built artifacts from build stage
|
|
COPY --from=build /usr/src/app/LICENSE .
|
|
COPY --from=build /usr/src/app/dist/packages/engine/ ./dist/packages/engine/
|
|
COPY --from=build /usr/src/app/dist/packages/server/ ./dist/packages/server/
|
|
COPY --from=build /usr/src/app/dist/packages/shared/ ./dist/packages/shared/
|
|
COPY --from=build /usr/src/app/dist/packages/pieces/ ./dist/packages/pieces/
|
|
COPY --from=build /usr/src/app/packages ./packages
|
|
|
|
# Copy frontend files to Nginx document root
|
|
COPY --from=build /usr/src/app/dist/packages/react-ui /usr/share/nginx/html/
|
|
|
|
LABEL service=activepieces
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|
|
EXPOSE 80 |