mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
58 lines
2.2 KiB
YAML
58 lines
2.2 KiB
YAML
services:
|
|
gitnexus-server:
|
|
image: ${SERVER_IMAGE:-ghcr.io/abhigyanpatwari/gitnexus:latest}
|
|
container_name: ${SERVER_CONTAINER_NAME:-gitnexus-server}
|
|
# Map the server to the same host port the web UI expects by default
|
|
# (http://localhost:4747). The browser runs on the host, so the UI's
|
|
# built-in default works without any reconfiguration.
|
|
ports:
|
|
- '${SERVER_HOST_PORT:-4747}:4747'
|
|
volumes:
|
|
# Persist the global registry, indexes, and cloned repos across runs.
|
|
- gitnexus-data:/data/gitnexus
|
|
# Optional: mount a host workspace so `gitnexus index <path>` can see
|
|
# repos you already have on disk. The default points at an empty
|
|
# `./workspace/` sibling that compose will create on first start —
|
|
# it intentionally does NOT bind-mount the repo root, which would
|
|
# expose `.git`, `.env`, and CI secrets to the container.
|
|
# Override with `WORKSPACE_DIR=/abs/path/to/your/repos`.
|
|
- ${WORKSPACE_DIR:-./workspace}:/workspace:ro
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:4747/api/health']
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
gitnexus-web:
|
|
image: ${WEB_IMAGE:-ghcr.io/abhigyanpatwari/gitnexus-web:latest}
|
|
container_name: ${WEB_CONTAINER_NAME:-gitnexus-web}
|
|
ports:
|
|
- '${WEB_HOST_PORT:-4173}:4173'
|
|
# Optional: override the backend URL served to the browser.
|
|
# Required when the gitnexus-server is not reachable at http://localhost:4747
|
|
# from the user's browser (e.g. remote server deployments).
|
|
#
|
|
# Docker Desktop (Mac/Windows):
|
|
# GITNEXUS_BACKEND_URL=http://host.docker.internal:4747
|
|
#
|
|
# Linux / remote server:
|
|
# GITNEXUS_BACKEND_URL=http://<server-ip>:4747
|
|
# (host.docker.internal requires extra_hosts on Linux Docker Engine)
|
|
#
|
|
# environment:
|
|
# - GITNEXUS_BACKEND_URL=http://host.docker.internal:4747
|
|
depends_on:
|
|
gitnexus-server:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:4173/']
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
gitnexus-data:
|