Add Python/Ruby code pieces and fix template loading performance

- Add Python code execution piece with subprocess-based runner
- Add Ruby code execution piece with subprocess-based runner
- Fix template loading: fetch individual templates from cloud for community edition
- Add piece name aliasing for renamed pieces (piece-text-ai → piece-ai, etc.)
- Add dev pieces caching to avoid disk reads on every request (60s TTL)
- Add Python and Ruby logos to Django static files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-20 00:18:42 -05:00
parent 3aa7199503
commit f3e1b8f8bf
19 changed files with 557 additions and 6 deletions

View File

@@ -14,6 +14,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get install -y --no-install-recommends \
openssh-client \
python3 \
python3-pip \
ruby \
g++ \
build-essential \
git \
@@ -69,17 +71,21 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
# 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
# Build all projects including custom pieces
RUN npx nx run-many --target=build --projects=react-ui,server-api,pieces-smoothschedule,pieces-python-code,pieces-ruby-code --configuration production --parallel=2 --skip-nx-cache --verbose
# 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
# Install dependencies for custom pieces
RUN --mount=type=cache,target=/root/.bun/install/cache \
cd dist/packages/pieces/community/smoothschedule && \
bun install --production && \
cd ../python-code && \
bun install --production && \
cd ../ruby-code && \
bun install --production
### STAGE 2: Run ###