Skip to content

Commit 4eb7140

Browse files
Stijnusclaude
andauthored
fix: resolve Docker build syntax errors (#1996) (#1999)
* fix: resolve Docker build syntax errors and merge conflicts - Fix incomplete ARG HuggingFace declaration to ARG HuggingFace_API_KEY - Fix invalid WORKDIR variable reference ${WORKDIR}/run to /app/run - Resolve merge conflicts preserving both runtime and development stages - Add proper development stage with corrected environment variables - Ensure both dockerbuild and dockerbuild:prod targets work correctly Resolves Docker build error: "target stage 'bolt-ai-development' could not be found" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * ci: add comprehensive Docker build validation to main CI pipeline - Add docker-validation job to ci.yaml workflow - Test both runtime (production) and development Docker targets - Validate docker-compose configuration syntax - Run on all PRs and pushes to catch Docker build issues early - Set 15-minute timeout to prevent hanging builds - Use --no-cache and --progress=plain for reliable validation This ensures Docker build syntax errors like #1996 are caught in CI before they reach main branch, preventing deployment failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: use modern docker compose command syntax in CI - Change docker-compose to docker compose (GitHub Actions uses Docker Compose v2) - Fixes CI failure: docker-compose: command not found - Ensures docker-compose validation works in GitHub Actions runners --------- Co-authored-by: Claude <[email protected]>
1 parent c69fae8 commit 4eb7140

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,33 @@ jobs:
5858
name: coverage-report
5959
path: coverage/
6060
retention-days: 7
61+
62+
docker-validation:
63+
name: Docker Build Validation
64+
runs-on: ubuntu-latest
65+
timeout-minutes: 15
66+
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
71+
- name: Set up Docker Buildx
72+
uses: docker/setup-buildx-action@v3
73+
74+
- name: Validate Docker production build
75+
run: |
76+
echo "🐳 Testing Docker production target..."
77+
docker build --target runtime . --no-cache --progress=plain
78+
echo "✅ Production target builds successfully"
79+
80+
- name: Validate Docker development build
81+
run: |
82+
echo "🐳 Testing Docker development target..."
83+
docker build --target development . --no-cache --progress=plain
84+
echo "✅ Development target builds successfully"
85+
86+
- name: Validate docker-compose configuration
87+
run: |
88+
echo "🐳 Validating docker-compose configuration..."
89+
docker compose config --quiet
90+
echo "✅ docker-compose configuration is valid"

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,39 @@ HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=5 \
5454

5555
# Start the Remix server
5656
CMD ["node", "build/server/index.js"]
57+
58+
59+
# ---- development stage ----
60+
FROM build AS development
61+
62+
# Define environment variables for development
63+
ARG GROQ_API_KEY
64+
ARG HuggingFace_API_KEY
65+
ARG OPENAI_API_KEY
66+
ARG ANTHROPIC_API_KEY
67+
ARG OPEN_ROUTER_API_KEY
68+
ARG GOOGLE_GENERATIVE_AI_API_KEY
69+
ARG OLLAMA_API_BASE_URL
70+
ARG XAI_API_KEY
71+
ARG TOGETHER_API_KEY
72+
ARG TOGETHER_API_BASE_URL
73+
ARG VITE_LOG_LEVEL=debug
74+
ARG DEFAULT_NUM_CTX
75+
76+
ENV GROQ_API_KEY=${GROQ_API_KEY} \
77+
HuggingFace_API_KEY=${HuggingFace_API_KEY} \
78+
OPENAI_API_KEY=${OPENAI_API_KEY} \
79+
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} \
80+
OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \
81+
GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \
82+
OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \
83+
XAI_API_KEY=${XAI_API_KEY} \
84+
TOGETHER_API_KEY=${TOGETHER_API_KEY} \
85+
TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL} \
86+
AWS_BEDROCK_CONFIG=${AWS_BEDROCK_CONFIG} \
87+
VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
88+
DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX} \
89+
RUNNING_IN_DOCKER=true
90+
91+
RUN mkdir -p /app/run
92+
CMD ["pnpm", "run", "dev", "--host"]

0 commit comments

Comments
 (0)