try for docker build again

This commit is contained in:
dal 2025-08-19 11:14:30 -06:00
parent 9efd1f49ff
commit 001fbff65c
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 86 additions and 21 deletions

83
.dockerignore Normal file
View File

@ -0,0 +1,83 @@
# Sticky disk directories (can't be accessed by Docker)
.turbo
lost+found
# Dependencies (will be installed fresh in Docker)
node_modules
**/node_modules
# Git and CI
.git
.github
.gitignore
# Build outputs
dist
**/dist
.next
**/.next
build
**/build
out
**/out
# Test and coverage
coverage
**/coverage
*.test.*
*.spec.*
__tests__
test
tests
# Documentation
*.md
README.md
CHANGELOG.md
LICENSE
docs
# IDE and OS
.vscode
.idea
*.swp
*.swo
.DS_Store
Thumbs.db
# Environment files (security)
.env
.env.*
!.env.example
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Temporary files
tmp
temp
*.tmp
# TypeScript
*.tsbuildinfo
# Package manager files (except lock files which we need)
.npm
.yarn
.pnpm-store
# Rust/CLI stuff (not needed for server)
target
Cargo.lock
apps/api
apps/cli
# Other apps (only building server)
apps/web
apps/trigger
apps/electric-server

View File

@ -12,9 +12,6 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: buster-so/buster-server
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_REMOTE_ONLY: true
jobs:
build-and-push:
@ -50,12 +47,6 @@ jobs:
key: ${{ github.repository }}-docker-pnpm-store
path: ${{ env.STORE_PATH }}
- name: Mount Turbo cache sticky disk
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-docker-turbo-cache
path: ./.turbo
- name: Set up Docker Builder with Blacksmith cache
uses: useblacksmith/setup-docker-builder@v1
@ -96,8 +87,6 @@ jobs:
org.opencontainers.image.created=${{ steps.meta.outputs.timestamp }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
build-args: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
TURBO_TEAM=${{ vars.TURBO_TEAM }}
COMMIT_SHA=${{ steps.meta.outputs.sha_short }}
BUILD_DATE=${{ steps.meta.outputs.timestamp }}

View File

@ -33,8 +33,6 @@ RUN npm install -g bun@1.2.15
# Set build environment
ENV DOCKER_BUILD=true
ENV CI=true
ARG TURBO_TOKEN
ARG TURBO_TEAM
ARG COMMIT_SHA
ARG BUILD_DATE
@ -46,14 +44,9 @@ COPY --from=deps /app/apps/server/node_modules ./apps/server/node_modules
# Copy all source files
COPY . .
# Build with Turbo (uses remote cache if available)
RUN if [ -n "$TURBO_TOKEN" ] && [ -n "$TURBO_TEAM" ]; then \
echo "Building with Turbo remote cache" && \
turbo run build --filter=@buster-app/server; \
else \
echo "Building without Turbo remote cache" && \
turbo run build --filter=@buster-app/server --force; \
fi
# Build with Turbo (Docker layer caching will cache this step)
RUN echo "Building with Turbo..." && \
turbo run build --filter=@buster-app/server
# Build the final server bundle
WORKDIR /app/apps/server