Files
EOS/docker-compose.yaml
T
2d18547aaa build: multi-stage Docker image with uv and BuildKit caching (#1261)
* build: multi-stage Docker image with uv and BuildKit caching

Builder/runtime split keeps the toolchain out of the runtime image
(standalone ~1.8GB -> ~1.2GB). Dependencies install with uv from
uv.lock in a cache-mounted, source-independent layer. Runtime keeps
the editable install because akkudoktoreos.core.version needs the
src/ layout. Also fixes the io.hass.version label and adds a
HEALTHCHECK.

* build: address Docker image review feedback

- Healthcheck honours EOS_SERVER__PORT instead of hardcoding 8503.
- BUILD_VERSION defaults to "dev" rather than the literal "VERSION";
  docker-compose passes the real version, and the redundant
  org.opencontainers.image.version label is dropped (CI sets it via
  docker/metadata-action).

* fix: use resolved server port for container healthcheck

---------

Co-authored-by: Normann <github@koldrack.com>
Co-authored-by: Normann Koldrack <normann.koldrack@desy.de>
2026-09-07 08:13:09 +02:00

44 lines
1.1 KiB
YAML

---
networks:
default:
name: "eos"
services:
eos:
image: "akkudoktor/eos:${VERSION}"
container_name: "akkudoktoreos"
read_only: true
build:
context: .
dockerfile: "Dockerfile"
args:
PYTHON_VERSION: "${PYTHON_VERSION}"
BUILD_VERSION: "${VERSION}"
env_file:
- .env
environment:
- OPENBLAS_NUM_THREADS=1
- OMP_NUM_THREADS=1
- MKL_NUM_THREADS=1
- PIP_PROGRESS_BAR=off
- PIP_NO_COLOR=1
- EOS_SERVER__EOSDASH_SESSKEY=s3cr3t
- EOS_SERVER__HOST=0.0.0.0
- EOS_SERVER__PORT=8503
- EOS_SERVER__EOSDASH_HOST=0.0.0.0
- EOS_SERVER__EOSDASH_PORT=8504
- DOCKER_COMPOSE_DATA_DIR=${HOME}/.local/share/net.akkudoktor.eos
ulimits:
nproc: 65535
nofile: 65535
security_opt:
- seccomp:unconfined
restart: unless-stopped
ports:
# Configure what ports to expose on host
- "${EOS_SERVER__PORT}:8503"
- "${EOS_SERVER__EOSDASH_PORT}:8504"
# Volume mount configuration
volumes:
- ${DOCKER_COMPOSE_DATA_DIR}:/data:rw