Sign inSign up

peteri14/dockernexus

By peteri14

Updated 3 months ago

Image
0

211

peteri14/dockernexus repository overview

DockerNexus is a lightweight Docker management web application inspired by Portainer-style host administration. It provides a Go backend, Docker SDK integration, Docker Compose executable-based stack operations, and a React/TypeScript frontend for viewing and operating Docker resources from a browser.

DockerNexus is configured with environment variables.

VariableDefaultDescription
ADDR:8080HTTP listen address.
DATA_DIR/data in Docker, ./data locallyDirectory for the SQLite database and persisted runtime files.
FRONTEND_DIST/app/public in Docker, ./public locallyDirectory containing the built frontend assets.
ADMIN_USERadminInitial administrator username.
ADMIN_PASSWORD123Initial administrator password. Change this before production use.
SESSION_COOKIE_NAMEdockernexus_sessionName of the browser session cookie.
SESSION_TTL24hSession lifetime parsed as a Go duration.
COOKIE_SECUREfalseSet to true when serving behind HTTPS.
STACKS_DIR/stacks in DockerRequired directory containing one subdirectory per Compose stack. The backend exits with an error if it is missing or not a directory.

DockerNexus can authenticate users through OAuth2 / OpenID Connect providers such as Casdoor.

Docker Compose stack detection and control

STACKS_DIR is required. It must point to a directory containing one subdirectory per Compose stack. The subdirectory name is the stack name. DockerNexus also discovers active stacks from Docker resources with this label:

com.docker.compose.project

A stack is Defined when its stack directory contains compose.yml or docker-compose.yml. It is Active when at least one Docker container, network, or volume has com.docker.compose.project=<stack name>.

The Stacks page runs stack operations from the selected stack directory through the Docker Compose executable. The backend executes docker compose -f <compose file> -p <stack> up -d or docker compose -f <compose file> -p <stack> down with the stack directory as the working directory, and streams stdout/stderr back to the browser.

Execute by a compose file

services:
  dockernexus:
    build: .
    ports:
      - "8080:8080"
    environment:
      ADDR: ":8080"
      DATA_DIR: "/data"
      ADMIN_USER: "admin"
      ADMIN_PASSWORD: "admin123"
      SESSION_COOKIE_NAME: "dockernexus_session"
      SESSION_TTL: "24h"
      # Set true only when serving through HTTPS.
      COOKIE_SECURE: "false"
      STACKS_DIR: "/stacks"
    volumes:
      # This is necessary for docker management
      - /var/run/docker.sock:/var/run/docker.sock
      # The SQLite database and other things may go here
      - ./data:/data
      # Mount the host directory that contains one subdirectory per Compose stack.
      - ./stacks:/stacks
    restart: unless-stopped

volumes:
  dockernexus-data:

Tag summary

Content type

Image

Digest

sha256:c7c194a75

Size

38.8 MB

Last updated

3 months ago

docker pull peteri14/dockernexus:0.0.7