mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 17:29:41 +02:00
A new Docker install was: clone (undocumented), copy .env.example by hand, fix an Unraid data path and a Perth time zone, replace `changeme`, run the start script, and then guess when the server was up. Start-Codeman.sh now does all of it from a fresh clone: - Preflight names the fix for a missing docker CLI, a missing or too-old Compose plugin (config --environment needs 2.27.2, docker/compose#11891), and an unreachable daemon (docker group, never sudo). - With no docker/.env, it asks three questions (data folder, port, password; Enter takes each default: ~/codeman-docker, 3000 or the next free port, a generated password) and writes docker/.env FROM the example, so every key the updater's diffRequiredEnvKeys expects is present. Mode 0600, host time zone, values Compose would interpolate single-quoted. Refuses $HOME, ~/.codeman (a native install's state dir) and anything inside the checkout (the image build context). --yes / no TTY take the defaults, --setup-only stops after writing the file. An existing .env is never edited, and root never runs the setup (Unraid keeps the hand route). - After `up`, it waits until the server answers (docker exec probe, crash loop caught by the restart count) and prints the URL, the LAN URL, the generated password and the logs/stop commands; --no-wait skips the wait. - `changeme` is refused before anything starts (the container publishes on every interface and holds the Docker socket); Update-Codeman.sh checks it before its build and down so the stack is never left stopped. - Compose settings are read with ONE config --environment call, with its error reported, instead of three silent ones. docker-compose.yaml and server.Dockerfile are untouched (their hashes gate the in-app updater), and .env.example changes values and comments only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
104 lines
4.8 KiB
Bash
104 lines
4.8 KiB
Bash
# =============================================================================
|
|
# Codeman Docker Compose environment template
|
|
#
|
|
# Usually there is no need to copy this by hand: on its first run,
|
|
# `bash docker/Start-Codeman.sh` writes docker/.env from this file, asking for
|
|
# the data folder, port and password and filling in this host's time zone.
|
|
# Copy it yourself (to docker/.env) only for a hand-built setup, such as a host
|
|
# where everything runs as root (Unraid) or Compose started without the script.
|
|
# =============================================================================
|
|
|
|
TZ=Etc/UTC
|
|
|
|
# Optional overrides for direct `docker compose` use. The Bash start script
|
|
# detects these values from CODEMAN_APPDATA_PATH automatically. Compose uses
|
|
# 1000:1000 when the variables are omitted.
|
|
# PUID=1000
|
|
# PGID=1000
|
|
|
|
# Name of the account that runs Codeman and all local CLI sessions. Changing
|
|
# this value rebuilds the image with a matching account.
|
|
CODEMAN_RUNTIME_USER=codeman
|
|
|
|
# Optional Git identity for commits made by Codeman and Docker-case agents. These values
|
|
# are written to each image's system Git configuration when it is rebuilt, so
|
|
# deployments can configure a consistent default. Set both values together.
|
|
# GIT_USER_NAME=
|
|
# GIT_USER_EMAIL=
|
|
|
|
# Required. Persistent Codeman application data, CLI credentials, and session
|
|
# state are stored here on the host and mounted at the runtime account's home
|
|
# directory in the container. The value below is the Unraid layout; the first
|
|
# run of Start-Codeman.sh suggests ~/codeman-docker instead.
|
|
CODEMAN_APPDATA_PATH=/mnt/user/appdata/codeman
|
|
|
|
# Optional. Absolute host path of this Codeman checkout, mounted at
|
|
# /opt/codeman so App Settings -> Updates can update Codeman in place. The Bash
|
|
# start script detects it from the compose file's own location, so it only needs
|
|
# setting for direct `docker compose` use or a checkout kept elsewhere. Point it
|
|
# at a directory that is not a git checkout and in-app updates are unavailable.
|
|
# CODEMAN_REPO_PATH=/mnt/user/appdata/codeman/app
|
|
|
|
# Required for Docker cases. This must be an absolute path on the Docker host.
|
|
# Codeman and each isolated case use this same path, so it cannot be a
|
|
# container-only path such as /home/codeman/codeman-cases.
|
|
CODEMAN_CASES_PATH=/mnt/user/appdata/codeman/codeman-cases
|
|
|
|
# Required. Network bind address, host port, and local image tag.
|
|
CODEMAN_HOST=0.0.0.0
|
|
CODEMAN_PORT=3000
|
|
CODEMAN_IMAGE=codeman:local
|
|
|
|
# Required for any network-accessible Codeman instance. Use a unique, strong
|
|
# password. This file is safe to commit; copy it to .env and set the value.
|
|
# Start-Codeman.sh refuses to start while it is still `changeme`.
|
|
CODEMAN_PASSWORD=changeme
|
|
|
|
# Required. Username for Codeman HTTP Basic authentication.
|
|
CODEMAN_USERNAME=admin
|
|
|
|
# Optional. Extra Host-header allowlist entries for a reverse-proxied domain
|
|
# (comma-separated; a bare `.suffix` matches every subdomain). Without it a
|
|
# proxied request is rejected with `403 Forbidden: host not allowed`. See
|
|
# README.md, "Reverse-proxy host allowlist".
|
|
# CODEMAN_ALLOWED_HOSTS=codeman.example.com,.internal.example.com
|
|
|
|
# The GitHub CLI (gh) and the Azure CLI (az, with the azure-devops extension)
|
|
# can be built into the images as git credential helpers, so Codeman can clone
|
|
# private GitHub and Azure DevOps repositories. Both are OFF by default and are
|
|
# NOT set here: turn them on in docker-compose.override.yml with the build args
|
|
# CODEMAN_INSTALL_GH / CODEMAN_INSTALL_AZ and, for the Docker-case agent image,
|
|
# the environment variables CODEMAN_AGENT_IMAGE_INSTALL_GH / _AZ. See
|
|
# README.md, "Private repositories".
|
|
|
|
# Optional: authenticate Gemini CLI without an interactive login.
|
|
GEMINI_API_KEY=
|
|
|
|
# Linux default. On Docker Desktop, use the socket path supported by your
|
|
# Docker installation when it differs from /var/run/docker.sock.
|
|
DOCKER_SOCKET=/var/run/docker.sock
|
|
|
|
# Optional override for direct `docker compose` use. The Bash start script
|
|
# detects this from DOCKER_SOCKET automatically. The direct Compose default is
|
|
# 999, but the correct value depends on the Docker host.
|
|
# DOCKER_SOCKET_GID=999
|
|
|
|
# Set to 1 only when Docker-case hook callbacks are required.
|
|
CODEMAN_DOCKER_BRIDGE_HOOKS=0
|
|
|
|
# Set to 1 when `docker info` reports `SwapLimit=false`. The case memory limit
|
|
# remains active; Codeman omits --memory-swap and filters the daemon's exact
|
|
# unsupported-swap warning while preserving all other Docker create errors.
|
|
CODEMAN_DOCKER_DISABLE_SWAP_LIMIT=0
|
|
|
|
# Required only when applying the macvlan example in README.md.
|
|
CODEMAN_MACVLAN_NETWORK=br0.11
|
|
CODEMAN_IPV4_ADDRESS=10.10.11.236
|
|
CODEMAN_MAC_ADDRESS=02:10:11:00:00:EC
|
|
|
|
# Required only when creating a new managed macvlan network, rather than using
|
|
# the external-network macvlan example.
|
|
CODEMAN_MACVLAN_PARENT=br0.11
|
|
CODEMAN_MACVLAN_SUBNET=10.10.11.0/24
|
|
CODEMAN_MACVLAN_GATEWAY=10.10.11.1
|