diff --git a/docker/Dockerfile b/docker/Dockerfile index b7bcb2b..a464bf0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,9 +16,6 @@ WORKDIR /app # Copy pre-built binary from host (built by Justfile) COPY dist/cachewd-linux-${TARGETARCH} /usr/local/bin/cachewd -# Copy default configuration file -COPY cachew.hcl /app/cachew.hcl - # Create state directory with proper permissions RUN mkdir -p /app/state/cache && \ chown -R cachew:cachew /app @@ -28,6 +25,6 @@ USER cachew # Bind to all interfaces in Docker (can be overridden with CACHEW_BIND env var) ENV CACHEW_BIND=0.0.0.0:8080 +ENV CACHEW_CONFIG=/app/config/cachew.hcl ENTRYPOINT ["/usr/local/bin/cachewd"] -CMD ["--config", "/app/cachew.hcl"] diff --git a/docker/Justfile b/docker/Justfile index 74a3751..d077f44 100644 --- a/docker/Justfile +++ b/docker/Justfile @@ -41,7 +41,7 @@ build-multi: run log_level="info": @just build @echo "→ Starting cachew at http://localhost:8080 (log-level={{ log_level }})" - @docker run --rm -it -p 8080:8080 -v {{ ROOT }}/state:/app/state --name cachew cachew:local --log-level={{ log_level }} + @docker run --rm -p 8080:8080 -v {{ ROOT }}/state:/app/state -v {{ ROOT }}/cachew.hcl:/app/config/cachew.hcl --name cachew cachew:local --log-level={{ log_level }} # Clean up Docker images clean: