mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-15 23:32:49 +00:00
| .. | ||
| .env.example | ||
| compose.yaml | ||
| Dockerfile | ||
| nginx.conf | ||
| README.md | ||
Docker
This folder contains the Docker assets for gitnexus-web.
Files
Dockerfileis the source for the publishedgitnexus-webimage. It buildsgitnexus-sharedandgitnexus-webin a Node builder stage, then copies only the compiled static site into a tinynginx:alpineruntime image.nginx.confserves the built assets and falls back toindex.htmlso client-side routes keep working.compose.yamlstarts the published image with Docker Compose..env.exampleis an optional shell env file for the example commands below. It sets the image name, container name, and exposed port. It does not inject application config into the frontend bundle.
Optional env file
Create a local env file if you want reusable image/container names and host port settings:
cp docker/.env.example docker/.env
set -a
source docker/.env
set +a
docker/.env is ignored by git via the repository-wide .env rules.
Run with Docker
docker run --rm \
--name "${CONTAINER_NAME:-gitnexus-web}" \
-p "${HOST_PORT:-8080}:80" \
"${IMAGE_NAME:-ghcr.io/abhigyanpatwari/gitnexus-web:latest}"
Then open http://localhost:${HOST_PORT:-8080}.
Run with Docker Compose
docker compose --env-file docker/.env -f docker/compose.yaml up -d
If you do not want an env file, the defaults in compose.yaml are already set to:
image: ghcr.io/abhigyanpatwari/gitnexus-web:latest
container_name: gitnexus-web
port: 8080 -> 80
Notes
- The published image serves the production frontend only. It does not start
gitnexus serve. - In backend mode, the app still defaults to
http://localhost:4747unless you change the server URL in the UI. - The Dockerfile is kept here so the published image definition is versioned with the app, even if most users only need
docker runordocker compose. - For iterative frontend development,
cd gitnexus-web && npm run devis still the faster workflow.