1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ==============================================================================
# RepoLens Docker Compose Configuration
# ==============================================================================
#
# Usage:
# # Build the image
# docker compose build
#
# # Run repolens on current directory
# docker compose run --rm repolens plan
#
# # Run with a specific command
# docker compose run --rm repolens report --format html
#
# # Interactive mode
# docker compose run --rm repolens apply --interactive
#
# ==============================================================================
services:
repolens:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/delfour-co/repolens:latest
container_name: repolens
# Mount current directory as the repository to audit
volumes:
- .:/repo:ro
# Mount git config for repository detection
- ~/.gitconfig:/home/repolens/.gitconfig:ro
# Mount GitHub CLI config for API access
- ~/.config/gh:/home/repolens/.config/gh:ro
# Enable TTY for interactive mode
tty: true
stdin_open: true
# Set working directory
working_dir: /repo
# Security: run as non-root
user: "1000:1000"
# Environment variables (optional)
environment:
- TERM=xterm-256color
# Uncomment to set GitHub token directly
# - GITHUB_TOKEN=${GITHUB_TOKEN}