Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1c93b81d1 | |||
| d078bb1c44 | |||
| 56c648187a | |||
| 8870d60ccc | |||
| d54515244c | |||
| 2918cfde25 | |||
| dd77cf6a48 | |||
| 961a0985b6 | |||
| d3f5e9f185 | |||
| 9aab08b8e4 | |||
| 727487053d | |||
| 17c2d04d70 | |||
| 636b68d263 |
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
+5
-3
@@ -37,8 +37,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Happy Coder globally
|
||||
RUN npm install -g happy-coder
|
||||
# Install Happy Coder and Claude Code globally
|
||||
RUN npm install -g happy-coder @anthropic-ai/claude-code
|
||||
|
||||
# Install Antigravity (Google's Project IDX / Cloud Code alternative)
|
||||
# Note: Antigravity might be packaged differently - adjust as needed
|
||||
@@ -58,9 +58,11 @@ RUN groupadd -g 1000 user && \
|
||||
RUN mkdir -p /workspace && \
|
||||
chown -R user:user /workspace
|
||||
|
||||
# Copy startup script
|
||||
# Copy startup scripts
|
||||
COPY --chmod=755 scripts/startapp.sh /startapp.sh
|
||||
COPY --chmod=755 scripts/init-repo.sh /usr/local/bin/init-repo
|
||||
# Fix app user shell after baseimage-gui creates it at runtime
|
||||
COPY --chmod=755 scripts/cont-init-user.sh /etc/cont-init.d/20-fix-user-shell.sh
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /workspace
|
||||
|
||||
+13
-3
@@ -59,9 +59,18 @@ These MUST be configured before deployment:
|
||||
- **Format:** `ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
||||
- **Scopes:** `repo`
|
||||
|
||||
### Anthropic API Key
|
||||
- **Variable:** `ANTHROPIC_API_KEY`
|
||||
- **File:** Kubernetes Secret (referenced by `envSecretName`)
|
||||
- **Type:** String (Anthropic API key)
|
||||
- **Description:** API key for Claude Code / Happy Coder authentication. Browser-based OAuth login does not work inside the VNC session, so this key is **required** for Happy Coder to function.
|
||||
- **Required:** Yes (for Happy Coder / Claude Code)
|
||||
- **Format:** `sk-ant-api03-...`
|
||||
- **How to get:** https://console.anthropic.com/settings/keys
|
||||
|
||||
### VNC Password
|
||||
- **Variable:** `vnc-password`
|
||||
- **File:** Sealed Secret
|
||||
- **File:** Kubernetes Secret (referenced by `envSecretName`)
|
||||
- **Type:** String
|
||||
- **Description:** Password for VNC web interface
|
||||
- **Required:** Recommended for security
|
||||
@@ -286,8 +295,9 @@ hostnames:
|
||||
### With Secrets
|
||||
```bash
|
||||
kubectl create secret generic antigravity-secrets \
|
||||
--from-literal=github-token='CHANGE_ME' \
|
||||
--from-literal=vnc-password='CHANGE_ME' \
|
||||
--from-literal=GITHUB_TOKEN='CHANGE_ME' \
|
||||
--from-literal=VNC_PASSWORD='CHANGE_ME' \
|
||||
--from-literal=ANTHROPIC_API_KEY='sk-ant-api03-...' \
|
||||
--dry-run=client -o yaml | \
|
||||
kubeseal --format=yaml > k8s/sealedsecrets.yaml
|
||||
```
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ apiVersion: v2
|
||||
name: devcontainer
|
||||
description: Antigravity Dev Container with Happy Coder AI assistant
|
||||
type: application
|
||||
version: 0.1.0
|
||||
version: 0.1.1
|
||||
appVersion: "latest"
|
||||
|
||||
+5
-2
@@ -38,6 +38,9 @@ resources:
|
||||
memory: "8Gi"
|
||||
cpu: "4000m"
|
||||
|
||||
# Name of existing Secret containing env vars (GITHUB_TOKEN, VNC_PASSWORD, etc.)
|
||||
# Defaults to: devcontainer-{name}-secrets-env
|
||||
# Name of existing Secret containing env vars. Defaults to: devcontainer-{name}-secrets-env
|
||||
# Recognized keys:
|
||||
# GITHUB_TOKEN — PAT for private repo access
|
||||
# VNC_PASSWORD — password for the VNC web UI
|
||||
# ANTHROPIC_API_KEY — required for Claude Code / Happy Coder auth (browser login won't work in VNC)
|
||||
envSecretName: ""
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Fix the app user (UID 1000) created by baseimage-gui at runtime.
|
||||
# baseimage-gui sets shell=/sbin/nologin and home=/dev/null, which
|
||||
# prevents VSCode from opening terminals.
|
||||
usermod -s /bin/bash app
|
||||
usermod -d /home/user app
|
||||
@@ -59,11 +59,18 @@ chown -R "$RUN_UID:$RUN_GID" "$WORKSPACE_DIR"
|
||||
mkdir -p "$HOME"
|
||||
chown "$RUN_UID:$RUN_GID" "$HOME"
|
||||
|
||||
# Warn if ANTHROPIC_API_KEY is not set — browser-based Claude login won't work in VNC
|
||||
if [ -z "$ANTHROPIC_API_KEY" ]; then
|
||||
echo "WARNING: ANTHROPIC_API_KEY is not set."
|
||||
echo " Claude Code cannot authenticate via browser inside this container."
|
||||
echo " Add ANTHROPIC_API_KEY to your Kubernetes secret to enable Happy Coder."
|
||||
fi
|
||||
|
||||
# Start Happy Coder daemon
|
||||
echo "Starting Happy Coder..."
|
||||
cd "$WORKSPACE_DIR"
|
||||
|
||||
happy daemon start
|
||||
happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..."
|
||||
|
||||
echo "Happy Coder daemon started"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user