Skip to content

Commit 07e0ceb

Browse files
committed
fix(ci): resolve Docker build, coverage deps, and perf script
1 parent 7847cc6 commit 07e0ceb

5 files changed

Lines changed: 190 additions & 24 deletions

File tree

.env.backup-2026-02-20

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# OpenCodeHub Configuration Backup Template (Sanitized)
2+
# This file intentionally contains NO real secrets.
3+
# If this file existed with credentials in git history, rotate all exposed keys immediately.
4+
5+
HOST=0.0.0.0
6+
PORT=3000
7+
SITE_URL=http://localhost:3000
8+
APP_NAME=OpenCodeHub
9+
10+
# Database
11+
DATABASE_DRIVER=postgres
12+
DATABASE_URL=<set-in-runtime>
13+
14+
# Auth
15+
JWT_SECRET=<generate-with-openssl-rand-base64-32>
16+
SESSION_SECRET=<generate-with-openssl-rand-base64-32>
17+
INTERNAL_HOOK_SECRET=<generate-with-openssl-rand-hex-32>
18+
19+
# OAuth
20+
OAUTH_GOOGLE_CLIENT_ID=
21+
OAUTH_GOOGLE_CLIENT_SECRET=
22+
OAUTH_GITHUB_CLIENT_ID=
23+
OAUTH_GITHUB_CLIENT_SECRET=
24+
25+
# Git
26+
GIT_REPOS_PATH=./data/repositories
27+
GIT_SSH_PORT=2222
28+
GIT_SSH_HOST_KEY=./data/ssh/host_key
29+
GIT_SSH_URL=ssh://git@localhost:2222
30+
31+
# Storage
32+
STORAGE_TYPE=local
33+
STORAGE_PATH=./data/storage
34+
STORAGE_BUCKET=
35+
STORAGE_REGION=
36+
STORAGE_ENDPOINT=
37+
STORAGE_ACCESS_KEY_ID=
38+
STORAGE_SECRET_ACCESS_KEY=
39+
40+
# Email
41+
SMTP_HOST=
42+
SMTP_PORT=587
43+
SMTP_USER=
44+
SMTP_PASSWORD=
45+
SMTP_FROM=noreply@example.com
46+
47+
# Redis
48+
REDIS_URL=<set-in-runtime>
49+
REDIS_CACHE_TTL=3600
50+
51+
# AI
52+
AI_PROVIDER=openai
53+
OPENAI_API_KEY=
54+
ANTHROPIC_API_KEY=
55+
56+
# Logging / Security
57+
LOG_LEVEL=info
58+
RATE_LIMIT_ENABLED=true
59+
RATE_LIMIT_AUTH=5
60+
RATE_LIMIT_API=100
61+
RATE_LIMIT_GIT=200
62+
RATE_LIMIT_GENERAL=60
63+
RATE_LIMIT_SKIP_DEV=false
64+
CSRF_SKIP_DEV=false
65+
66+
# Features
67+
ENABLE_REGISTRATION=true
68+
ENABLE_WIKI=true
69+
ENABLE_ISSUES=true
70+
ENABLE_ACTIONS=true
71+
ENABLE_PACKAGES=false
72+
ENABLE_AI_ASSISTANT=true

.githooks/pre-push

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR="$(git rev-parse --show-toplevel)"
5+
SCAN_SCRIPT="$ROOT_DIR/scripts/security/pre-push-secret-scan.sh"
6+
7+
if [[ ! -f "$SCAN_SCRIPT" ]]; then
8+
echo "[pre-push] secret scan script not found: $SCAN_SCRIPT"
9+
echo "[pre-push] blocking push until security hook is restored."
10+
exit 1
11+
fi
12+
13+
RANGES=()
14+
while read -r local_ref local_sha remote_ref remote_sha; do
15+
[[ -z "${local_sha:-}" ]] && continue
16+
17+
if [[ "$local_sha" =~ ^0+$ ]]; then
18+
continue
19+
fi
20+
21+
if [[ "$remote_sha" =~ ^0+$ ]]; then
22+
# New branch push: scan a recent commit window ending at local SHA.
23+
local_base="${local_sha}~20"
24+
if git rev-parse --verify "$local_base" >/dev/null 2>&1; then
25+
RANGES+=("${local_base}..${local_sha}")
26+
else
27+
RANGES+=("${local_sha}")
28+
fi
29+
else
30+
RANGES+=("${remote_sha}..${local_sha}")
31+
fi
32+
done
33+
34+
if [[ ${#RANGES[@]} -eq 0 ]]; then
35+
RANGES=("HEAD~20..HEAD")
36+
fi
37+
38+
bash "$SCAN_SCRIPT" "${RANGES[@]}"

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ WORKDIR /app
33

44
# Install dependencies
55
FROM base AS deps
6+
RUN apt-get update && apt-get install -y python3 make g++ gcc libc6-dev && rm -rf /var/lib/apt/lists/*
67
COPY package.json bun.lock ./
78
RUN bun install --frozen-lockfile
89

0 commit comments

Comments
 (0)