docker/docker-compose.ymlblame
View source
3e3af551# Grove — Full Development Stack
3e3af552#
3e3af553# Quick start:
36387cc4# 1. Build Mononoke: cd sapling && docker build -f ../docker/Dockerfile.mononoke -t grove/mononoke .
36387cc5# 2. Import a repo: ./scripts/import-repo.sh /path/to/git/repo grove
3e3af556# 3. Start: docker compose up
3e3af557#
3c994d38# Or run just the app layer while developing:
3c994d39# docker compose up grove-hub-api grove-api grove-web
3e3af5510
3e3af5511services:
3e3af5512 # ─── Mononoke Layer ───────────────────────────────────────────────
3e3af5513
3e3af5514 # SLAPI Server — Sapling Remote API (primary data API)
3e3af5515 mononoke-slapi:
3e3af5516 image: ghcr.io/letterpress-labs/grove-mononoke:latest
3e3af5517 container_name: grove-mononoke-slapi
3e3af5518 command:
3e3af5519 - --listening-host-port
3e3af5520 - "0.0.0.0:8443"
3e3af5521 - --config-path
3e3af5522 - /config
3e3af5523 - --test-instance
3e3af5524 ports:
3e3af5525 - "8443:8443"
3e3af5526 volumes:
3e3af5527 - ../config/mononoke:/config:ro
3e3af5528 - mononoke-data:/data/mononoke
3e3af5529 - ../config/certs:/certs:ro
3e3af5530 healthcheck:
3e3af5531 test: ["CMD", "curl", "-sf", "http://localhost:8443/health_check"]
3e3af5532 interval: 10s
3e3af5533 timeout: 5s
3e3af5534 retries: 3
3e3af5535 restart: unless-stopped
3e3af5536
3e3af5537 # Git Server — standard Git HTTP protocol for clone/push/pull
3e3af5538 mononoke-git:
3e3af5539 image: ghcr.io/letterpress-labs/grove-mononoke:latest
3e3af5540 container_name: grove-mononoke-git
3e3af5541 entrypoint: ["/usr/local/bin/git_server"]
3e3af5542 command:
3e3af5543 - --listening-host-port
3e3af5544 - "0.0.0.0:8080"
3e3af5545 - --config-path
3e3af5546 - /config
3e3af5547 - --test-instance
3e3af5548 ports:
3e3af5549 - "8080:8080"
3e3af5550 volumes:
3e3af5551 - ../config/mononoke:/config:ro
3e3af5552 - mononoke-data:/data/mononoke
3e3af5553 - ../config/certs:/certs:ro
3e3af5554 depends_on:
3e3af5555 mononoke-slapi:
3e3af5556 condition: service_healthy
3e3af5557 restart: unless-stopped
3e3af5558
3e3af5559 # ─── Grove App Layer ──────────────────────────────────────────────
3e3af5560
3c994d361 # Hub API — identity provider (WebAuthn passkeys, PATs, instance management)
3c994d362 grove-hub-api:
3c994d363 build:
3c994d364 context: ..
3c994d365 dockerfile: docker/Dockerfile.grove-hub-api
3c994d366 container_name: grove-hub-api
3c994d367 ports:
3c994d368 - "4001:4000"
3c994d369 volumes:
3c994d370 - hub-data:/data
3c994d371 environment:
3c994d372 - PORT=4000
3c994d373 - DATABASE_PATH=/data/hub.db
3c994d374 - JWT_SECRET=${JWT_SECRET:-grove-dev-secret}
3c994d375 - RP_ID=localhost
3c994d376 - ORIGIN=http://localhost:3000
3c994d377 - CORS_ORIGIN=http://localhost:3000
3c994d378 restart: unless-stopped
3c994d379
fb964da80 # Instance API — repo browsing, diffs, CI/CD runner (verifies hub-signed JWTs)
3e3af5581 grove-api:
3e3af5582 build:
3e3af5583 context: ..
3e3af5584 dockerfile: docker/Dockerfile.grove-api
3e3af5585 container_name: grove-api
3e3af5586 ports:
3e3af5587 - "4000:4000"
3e3af5588 volumes:
3e3af5589 - grove-data:/data
3e3af5590 - repo-mirrors:/data/repos
3e3af5591 environment:
3e3af5592 - PORT=4000
3e3af5593 - DATABASE_PATH=/data/grove.db
5130d1094 - GROVE_HUB_API_URL=http://grove-hub-api:4000
3e3af5595 - MONONOKE_GIT_URL=http://mononoke-git:8080
3e3af5596 - REPOS_DIR=/data/repos
3c994d397 - JWT_SECRET=${JWT_SECRET:-grove-dev-secret}
3e3af5598 - CORS_ORIGIN=http://localhost:3000
fb964da99 healthcheck:
39ac157100 test: ["CMD", "wget", "-qO-", "http://127.0.0.1:4000/health"]
fb964da101 interval: 10s
fb964da102 timeout: 3s
fb964da103 start_period: 15s
fb964da104 retries: 3
3e3af55105 depends_on:
3e3af55106 mononoke-git:
3e3af55107 condition: service_started
3e3af55108 restart: unless-stopped
3e3af55109
3e3af55110 # Web UI — Next.js frontend
3e3af55111 grove-web:
3e3af55112 build:
3e3af55113 context: ..
3e3af55114 dockerfile: docker/Dockerfile.grove-web
3e3af55115 container_name: grove-web
3e3af55116 ports:
3e3af55117 - "3000:3000"
3e3af55118 environment:
3e3af55119 - GROVE_API_URL=http://grove-api:4000
3c994d3120 - GROVE_HUB_API_URL=http://grove-hub-api:4000
3e3af55121 depends_on:
3e3af55122 - grove-api
3c994d3123 - grove-hub-api
3e3af55124 restart: unless-stopped
3e3af55125
3e3af55126volumes:
3e3af55127 mononoke-data:
3e3af55128 driver: local
3c994d3129 hub-data:
3c994d3130 driver: local
3e3af55131 grove-data:
3e3af55132 driver: local
3e3af55133 repo-mirrors:
3e3af55134 driver: local