Skip to content

Commit 95a004b

Browse files
ixxeL2097Frederic Spiers
andauthored
feat(nginx.conf): provide docker specific nginx.conf to enable local testing with docker-compose (#49)
Co-authored-by: Frederic Spiers <[email protected]>
1 parent 719b8ec commit 95a004b

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Once the tunnel is established, a proxy server is deployed on the GitGuardian si
1919

2020
## Install and configure
2121

22+
For GGBridge configuration instructions, please refer to our public documentation:
23+
- https://docs.gitguardian.com/platform/enterprise-administration/ggbridge
24+
2225
**ggbridge** is distributed as a Distroless Docker image based on Wolfi OS, ensuring minimal dependencies and enhanced security.
2326
Additionaly, a **shell** variant of the Docker image is available, this version includes additional tools and allows you to connect to the container via a shell, facilitating troubleshooting and debugging during development or integration.
2427

@@ -44,8 +47,9 @@ services:
4447
TLS_ENABLED: 'true'
4548
volumes:
4649
- ./tls/ca.crt:/etc/ggbridge/tls/ca.crt:ro
47-
- ./tls/client.crt:/etc/ggbridge/tls/client.crt:ro
48-
- ./tls/client.key:/etc/ggbridge/tls/client.key:ro
50+
- ./tls/tls.crt:/etc/ggbridge/tls/client.crt:ro
51+
- ./tls/tls.key:/etc/ggbridge/tls/client.key:ro
52+
- ./docker/nginx/nginx.local.conf:/etc/ggbridge/nginx.conf
4953
restart: on-failure
5054
```
5155

docker/nginx/nginx.local.conf

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
load_module "/usr/lib/nginx/modules/ngx_stream_module.so";
2+
3+
worker_processes 1;
4+
5+
error_log stderr notice;
6+
pid /var/run/nginx.pid;
7+
8+
events {
9+
worker_connections 1024;
10+
}
11+
12+
http {
13+
map_hash_bucket_size 128;
14+
map_hash_max_size 4096;
15+
16+
log_format main '$remote_addr - $remote_user [$time_local] '
17+
'"$request" $status $body_bytes_sent '
18+
'"$http_referer" "$http_user_agent"';
19+
20+
access_log /dev/stdout main;
21+
22+
server {
23+
listen 127.0.0.1:8081;
24+
25+
location / {
26+
return 404;
27+
}
28+
29+
location /healthz {
30+
default_type text/plain;
31+
return 200 "OK\n";
32+
}
33+
}
34+
}
35+
36+
stream {
37+
map_hash_bucket_size 128;
38+
map_hash_max_size 4096;
39+
40+
log_format main '$proxy_protocol_addr - $remote_addr [$time_local] '
41+
'$protocol $status $bytes_sent $bytes_received '
42+
'$session_time "$upstream_addr" '
43+
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
44+
45+
access_log /dev/stdout main;
46+
47+
resolver 127.0.0.11 valid=30s;
48+
resolver_timeout 5s;
49+
50+
server {
51+
listen 127.0.0.1:8443 proxy_protocol;
52+
ssl_preread on;
53+
proxy_pass $ssl_preread_server_name:443;
54+
proxy_protocol off;
55+
}
56+
}

0 commit comments

Comments
 (0)