Skip to content
Open
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
15 changes: 15 additions & 0 deletions web/docker/run-turbo-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

set -eu

TARGET_FILTER="$1"

if [ -s /run/secrets/turbo_team ] && [ -s /run/secrets/turbo_token ]; then
export TURBO_TEAM="$(cat /run/secrets/turbo_team)"
export TURBO_TOKEN="$(cat /run/secrets/turbo_token)"
echo "Turbo remote cache enabled for ${TARGET_FILTER}"
else
echo "Turbo remote cache not configured. Using local Turbo cache only."
fi

pnpm turbo run build --filter="${TARGET_FILTER}"
8 changes: 7 additions & 1 deletion web/ee/docker/Dockerfile.gh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ FROM base AS builder
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV TURBO_CACHE_DIR="/app/.turbo"

COPY docker/run-turbo-build.sh /usr/local/bin/run-turbo-build.sh

RUN chmod +x /usr/local/bin/run-turbo-build.sh

# Copy package.json files first (changes less frequently than source)
COPY ee/package.json ./ee/package.json
COPY oss/package.json ./oss/package.json
Expand All @@ -42,7 +46,9 @@ COPY ee/ ./ee/
RUN --mount=type=cache,id=turbo-ee,target=/app/.turbo \
--mount=type=cache,id=nextjs-ee,target=/app/ee/.next/cache \
--mount=type=cache,id=nextjs-oss,target=/app/oss/.next/cache \
pnpm turbo run build --filter=@agenta/ee
--mount=type=secret,id=turbo_team,required=false \
--mount=type=secret,id=turbo_token,required=false \
/usr/local/bin/run-turbo-build.sh @agenta/ee


FROM node:20.18.0-slim AS runner
Expand Down
8 changes: 7 additions & 1 deletion web/oss/docker/Dockerfile.gh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ FROM base AS builder
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV TURBO_CACHE_DIR="/app/.turbo"

COPY docker/run-turbo-build.sh /usr/local/bin/run-turbo-build.sh

RUN chmod +x /usr/local/bin/run-turbo-build.sh

# Copy package.json files first (changes less frequently than source)
COPY oss/package.json ./oss/package.json
COPY --parents packages/*/package.json ./
Expand All @@ -39,7 +43,9 @@ COPY oss/ ./oss/

RUN --mount=type=cache,id=turbo-oss,target=/app/.turbo \
--mount=type=cache,id=nextjs-oss,target=/app/oss/.next/cache \
pnpm turbo run build --filter=@agenta/oss
--mount=type=secret,id=turbo_team,required=false \
--mount=type=secret,id=turbo_token,required=false \
/usr/local/bin/run-turbo-build.sh @agenta/oss


FROM node:20.18.0-slim AS runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const Automations: React.FC = () => {
Automations
</Title>
<Button type="primary" size="small" icon={<PlusOutlined />} onClick={handleCreate}>
Create Automation
New Automation
</Button>
</div>

Expand Down
Loading