Add integration examples

Show how to wire the proxy into docker-compose and devcontainer setups without guessing the required mounts and commands.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
严浩
2026-03-08 17:51:12 +08:00
parent 65c4799a05
commit a51798f1b6
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{
"name": "app-with-host-git-cred-proxy",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"mounts": [
"source=${localEnv:HOST_GIT_CRED_PROXY_DIR},target=/opt/host-git-cred-proxy,type=bind,readonly"
],
"postCreateCommand": "/opt/host-git-cred-proxy/container/configure-git.sh --global"
}

View File

@@ -0,0 +1,16 @@
services:
dev:
image: mcr.microsoft.com/devcontainers/base:ubuntu
working_dir: /workspace
command: >
bash -lc "
/opt/host-git-cred-proxy/container/configure-git.sh --global &&
sleep infinity
"
tty: true
stdin_open: true
environment:
GIT_CRED_PROXY_URL: ${GIT_CRED_PROXY_URL:-http://host.docker.internal:18765}
volumes:
- .:/workspace
- ${HOST_GIT_CRED_PROXY_DIR}:/opt/host-git-cred-proxy:ro