this repo has no description

Change state path to /data for cleaner volume mounting

brookie.blog 49b5c748 7ee550c3

verified
+8 -3
Dockerfile
··· 33 33 34 34 WORKDIR /app 35 35 36 - # Copy binary from builder 36 + # Copy binary and entrypoint from builder 37 37 COPY --from=builder /build/brooke-spin /app/brooke-spin 38 + COPY entrypoint.sh /app/entrypoint.sh 38 39 39 - # Create data directory 40 - RUN mkdir -p /app/data && chown -R brooke:brooke /app 40 + # Set ownership and make entrypoint executable 41 + RUN chown -R brooke:brooke /app && \ 42 + chmod +x /app/entrypoint.sh 41 43 42 44 # Switch to non-root user 43 45 USER brooke 46 + 47 + # Use entrypoint to ensure data directory exists 48 + ENTRYPOINT ["/app/entrypoint.sh"] 44 49 45 50 # Default command 46 51 CMD ["/app/brooke-spin", "-config", "/app/config.yaml"]
+1 -1
config.example.yaml
··· 34 34 35 35 # Path to state file (SQLite database or JSON file) 36 36 # This file tracks which notifications have been processed 37 - path: "./data/state.db" 37 + path: "/data/state.db"
+1 -1
docker-compose.yml
··· 11 11 # Mount configuration and data 12 12 volumes: 13 13 - ./config.yaml:/app/config.yaml:ro 14 - - ./data:/app/data 14 + - ./data:/data 15 15 16 16 # Environment variables (optional, overrides config.yaml) 17 17 environment:
+8
entrypoint.sh
··· 1 + #!/bin/sh 2 + set -e 3 + 4 + # Ensure data directory exists and is writable 5 + mkdir -p /data 6 + 7 + # Execute the main command 8 + exec "$@"