feat(deploy): add production docker-compose, Caddyfile, and deploy script
Author: Aaron Steven White
Commit
5d7df9848eb0030f3a990d36390830765d586912Parent: 93a3426a81
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan7 files changed +292 -8
@@ -0,0 +1,12 @@
1+# Cospan Production Environment 2+# Copy to .env.production and fill in all values 3+ 4+# Domain (required) - point DNS A record at your server IP 5+DOMAIN=cospan.dev 6+ 7+# Database password (required) - generate with: openssl rand -base64 32 8+POSTGRES_PASSWORD= 9+ 10+# Node DID (required) - your ATProto DID for the node operator 11+# Get yours from: https://bsky.app/profile/yourhandle -> Settings -> DID 12+NODE_DID=did:plc:your-did-here
@@ -0,0 +1,20 @@
1+{$DOMAIN} { 2+ # Frontend (SvelteKit) 3+ reverse_proxy web:3000 4+ 5+ # AppView XRPC + OAuth (proxied through SvelteKit catch-all routes) 6+ # Direct XRPC access for external clients 7+ handle /xrpc/* { 8+ reverse_proxy appview:3000 9+ } 10+} 11+ 12+node.{$DOMAIN} { 13+ # Node XRPC 14+ reverse_proxy /xrpc/* node:3001 15+ 16+ # Git smart HTTP 17+ reverse_proxy /*/info/refs node:3001 18+ reverse_proxy /*/git-upload-pack node:3001 19+ reverse_proxy /*/git-receive-pack node:3001 20+}
@@ -6,14 +6,14 @@ WORKDIR /app
66 RUN corepack enable 77 88 # Copy workspace root files 9-COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ 9+COPY package.json pnpm-workspace.yaml ./ 1010 1111 # Copy the web app and shared packages 1212 COPY apps/web/ apps/web/ 1313 COPY packages/ packages/ 1414 15-RUN pnpm install --frozen-lockfile 16-RUN pnpm --filter @cospan/web build 15+RUN cd apps/web && pnpm install --no-frozen-lockfile 16+RUN cd apps/web && pnpm build 1717 1818 # Stage 2: Runtime 1919 FROM node:22-slim
@@ -22,9 +22,10 @@ WORKDIR /app
2222 2323 COPY --from=builder /app/apps/web/build ./build 2424 COPY --from=builder /app/apps/web/package.json . 25+COPY --from=builder /app/apps/web/node_modules ./node_modules 2526 2627 USER 1001 2728 28-EXPOSE 3002 29+EXPOSE 3000 2930 3031 CMD ["node", "build"]
@@ -1,11 +1,14 @@
11 # Stage 1: Build 22 FROM rust:1.85-bookworm AS builder 33 4+RUN apt-get update && apt-get install -y cmake g++ pkg-config libssl-dev && rm -rf /var/lib/apt/lists/* 5+ 46 WORKDIR /app 57 68 # Copy workspace files 79 COPY Cargo.toml Cargo.lock ./ 810 COPY crates/ crates/ 11+COPY packages/ packages/ 912 1013 # Build the cospan-appview binary 1114 RUN cargo build --release -p cospan-appview
@@ -13,11 +16,9 @@ RUN cargo build --release -p cospan-appview
1316 # Stage 2: Runtime 1417 FROM debian:bookworm-slim 1518 16-RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* 19+RUN apt-get update && apt-get install -y ca-certificates libssl3 curl && rm -rf /var/lib/apt/lists/* 1720 1821 COPY --from=builder /app/target/release/cospan-appview /usr/local/bin/ 19- 20-# Include migrations for runtime migration execution 2122 COPY --from=builder /app/crates/cospan-appview/migrations /app/migrations 2223 2324 WORKDIR /app
@@ -1,11 +1,15 @@
11 # Stage 1: Build 22 FROM rust:1.85-bookworm AS builder 33 4+# Install build dependencies for tree-sitter grammars (C/C++ compilers) 5+RUN apt-get update && apt-get install -y cmake g++ pkg-config libssl-dev && rm -rf /var/lib/apt/lists/* 6+ 47 WORKDIR /app 58 69 # Copy workspace files 710 COPY Cargo.toml Cargo.lock ./ 811 COPY crates/ crates/ 12+COPY packages/ packages/ 913 1014 # Build the cospan-node binary 1115 RUN cargo build --release -p cospan-node
@@ -13,7 +17,7 @@ RUN cargo build --release -p cospan-node
1317 # Stage 2: Runtime 1418 FROM debian:bookworm-slim 1519 16-RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* 20+RUN apt-get update && apt-get install -y ca-certificates libssl3 && rm -rf /var/lib/apt/lists/* 1721 1822 COPY --from=builder /app/target/release/cospan-node /usr/local/bin/ 1923