Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can leave this, and still vol mount over it to override no? Leaving it in gives random people a decent base starting point that Just Works

# Create state directory with proper permissions
RUN mkdir -p /app/state/cache && \
chown -R cachew:cachew /app
Expand All @@ -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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noticed that ---config via the CMD doesn't work and needs to be passed this way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fix that...


ENTRYPOINT ["/usr/local/bin/cachewd"]
CMD ["--config", "/app/cachew.hcl"]
2 changes: 1 addition & 1 deletion docker/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down