-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (80 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
83 lines (80 loc) · 2.38 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
services:
git-proxy:
build: .
ports:
- '8000:8000'
- '8081:8081'
command: ['node', 'dist/index.js', '--config', '/app/test-e2e.proxy.config.json']
volumes:
- ./test-e2e.proxy.config.json:/app/test-e2e.proxy.config.json:ro
# If using Podman, you might need to add the :Z or :z option for SELinux
# - ./test-e2e.proxy.config.json:/app/test-e2e.proxy.config.json:ro,Z
depends_on:
mongodb:
condition: service_healthy
git-server:
condition: service_healthy
networks:
- git-network
environment:
- NODE_ENV=test
- GIT_PROXY_UI_PORT=8081
- GIT_PROXY_SERVER_PORT=8000
- NODE_OPTIONS=--trace-warnings
- NODE_TLS_REJECT_UNAUTHORIZED=0
# Runtime environment variables for UI configuration
# API_URL should point to the same origin as the UI (both on 8081)
# Leave empty or unset for same-origin API access
# - API_URL=
# CORS configuration - controls which origins can access the API
# Options:
# - '*' = Allow all origins (testing/development)
# - Comma-separated list = 'http://localhost:3000,https://example.com'
# - Unset/empty = Same-origin only (most secure)
- ALLOWED_ORIGINS=
healthcheck:
test: ['CMD-SHELL', 'curl -sf http://localhost:8081/api/v1/healthcheck || exit 1']
interval: 5s
timeout: 5s
retries: 12
start_period: 10s
mongodb:
image: mongo:7@sha256:606f8e029603330411a7dd10b5ffd50eefc297fc80cee89f10a455e496a76ae7
ports:
- '27017:27017'
networks:
- git-network
environment:
- MONGO_INITDB_DATABASE=gitproxy
volumes:
- mongodb_data:/data/db
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s
git-server:
build: localgit/
ports:
- '8443:8443' # HTTPS git server
environment:
- GIT_HTTP_EXPORT_ALL=true
networks:
- git-network
hostname: git-server
healthcheck:
test:
[
'CMD-SHELL',
'GIT_TERMINAL_PROMPT=0 GIT_SSL_NO_VERIFY=1 git ls-remote https://admin:admin123@localhost:8443/test-owner/test-repo.git HEAD || exit 1',
]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s
networks:
git-network:
driver: bridge
volumes:
mongodb_data: