mirror of https://github.com/buster-so/buster.git
try for docker build again
This commit is contained in:
parent
9efd1f49ff
commit
001fbff65c
|
@ -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
|
|
@ -12,9 +12,6 @@ on:
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: buster-so/buster-server
|
IMAGE_NAME: buster-so/buster-server
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
||||||
TURBO_REMOTE_ONLY: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
|
@ -50,12 +47,6 @@ jobs:
|
||||||
key: ${{ github.repository }}-docker-pnpm-store
|
key: ${{ github.repository }}-docker-pnpm-store
|
||||||
path: ${{ env.STORE_PATH }}
|
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
|
- name: Set up Docker Builder with Blacksmith cache
|
||||||
uses: useblacksmith/setup-docker-builder@v1
|
uses: useblacksmith/setup-docker-builder@v1
|
||||||
|
|
||||||
|
@ -96,8 +87,6 @@ jobs:
|
||||||
org.opencontainers.image.created=${{ steps.meta.outputs.timestamp }}
|
org.opencontainers.image.created=${{ steps.meta.outputs.timestamp }}
|
||||||
org.opencontainers.image.ref.name=${{ github.ref_name }}
|
org.opencontainers.image.ref.name=${{ github.ref_name }}
|
||||||
build-args: |
|
build-args: |
|
||||||
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_TEAM=${{ vars.TURBO_TEAM }}
|
|
||||||
COMMIT_SHA=${{ steps.meta.outputs.sha_short }}
|
COMMIT_SHA=${{ steps.meta.outputs.sha_short }}
|
||||||
BUILD_DATE=${{ steps.meta.outputs.timestamp }}
|
BUILD_DATE=${{ steps.meta.outputs.timestamp }}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,6 @@ RUN npm install -g bun@1.2.15
|
||||||
# Set build environment
|
# Set build environment
|
||||||
ENV DOCKER_BUILD=true
|
ENV DOCKER_BUILD=true
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
ARG TURBO_TOKEN
|
|
||||||
ARG TURBO_TEAM
|
|
||||||
ARG COMMIT_SHA
|
ARG COMMIT_SHA
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|
||||||
|
@ -46,14 +44,9 @@ COPY --from=deps /app/apps/server/node_modules ./apps/server/node_modules
|
||||||
# Copy all source files
|
# Copy all source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build with Turbo (uses remote cache if available)
|
# Build with Turbo (Docker layer caching will cache this step)
|
||||||
RUN if [ -n "$TURBO_TOKEN" ] && [ -n "$TURBO_TEAM" ]; then \
|
RUN echo "Building with Turbo..." && \
|
||||||
echo "Building with Turbo remote cache" && \
|
turbo run build --filter=@buster-app/server
|
||||||
turbo run build --filter=@buster-app/server; \
|
|
||||||
else \
|
|
||||||
echo "Building without Turbo remote cache" && \
|
|
||||||
turbo run build --filter=@buster-app/server --force; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build the final server bundle
|
# Build the final server bundle
|
||||||
WORKDIR /app/apps/server
|
WORKDIR /app/apps/server
|
||||||
|
|
Loading…
Reference in New Issue