-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (103 loc) · 3.48 KB
/
docker-compose.yml
File metadata and controls
110 lines (103 loc) · 3.48 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
services:
# ── git-proxy-java ────────────────────────────────────────────────────────────
git-proxy-java:
build: .
ports:
- "8080:8080"
volumes:
- ./docker/git-proxy-docker-default.yml:/app/conf/git-proxy-docker-default.yml:ro
# Uncomment to enable debug logging (see docker/log4j2-debug.xml):
# - ./docker/log4j2-debug.xml:/app/conf/log4j2-debug.xml:ro
depends_on:
gitea:
condition: service_healthy
environment:
GITPROXY_API_KEY: "change-me-in-production"
GITPROXY_CONFIG_PROFILES: docker-default
# Uncomment together with the volume mount above to activate debug logging:
# JAVA_TOOL_OPTIONS: -Dlog4j2.configurationFile=/app/conf/log4j2-debug.xml
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:8080/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 6
start_period: 20s
# ── Gitea (local git server) ───────────────────────────────────────────────
gitea:
image: docker.io/gitea/gitea:1.25-rootless
ports:
- "3000:3000"
environment:
GITEA__security__INSTALL_LOCK: "true"
GITEA__security__SECRET_KEY: "change-me-in-production"
GITEA__server__HTTP_PORT: "3000"
GITEA__database__DB_TYPE: "sqlite3"
GITEA__log__LEVEL: "Warn"
GITEA__repository__DEFAULT_BRANCH: "main"
volumes:
- gitea-data:/data
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:3000/api/healthz"]
interval: 5s
timeout: 5s
retries: 12
start_period: 10s
# ── PostgreSQL (optional — start with: docker compose --profile postgres up) ─
postgres:
image: docker.io/postgres:17-alpine
profiles: [postgres]
environment:
POSTGRES_DB: gitproxy
POSTGRES_USER: gitproxy
POSTGRES_PASSWORD: gitproxy
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitproxy"]
interval: 5s
timeout: 5s
retries: 10
# ── MongoDB (optional — start with: docker compose --profile mongo up) ─────
mongo:
image: docker.io/mongo:7
profiles: [mongo]
environment:
MONGO_INITDB_ROOT_USERNAME: gitproxy
MONGO_INITDB_ROOT_PASSWORD: gitproxy
MONGO_INITDB_DATABASE: gitproxy
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s
# ── Database web UIs (optional) ───────────────────────────────────────────
mongo-express:
image: docker.io/mongo-express:1
profiles: [mongo]
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: gitproxy
ME_CONFIG_MONGODB_ADMINPASSWORD: gitproxy
ME_CONFIG_MONGODB_URL: mongodb://gitproxy:gitproxy@mongo:27017/
ME_CONFIG_BASICAUTH: "false"
ports:
- "8081:8081"
adminer:
image: docker.io/adminer:4
profiles: [postgres]
depends_on:
- postgres
ports:
- "8082:8080"
volumes:
gitea-data:
postgres-data:
mongo-data: