Files
whatshooked/Dockerfile
Hein c1dbff318d
Some checks failed
CI / Test (1.22) (push) Failing after -24m19s
CI / Test (1.23) (push) Failing after -24m15s
CI / Lint (push) Successful in -26m35s
CI / Build (push) Successful in -26m34s
feat(docker): 🚀 Update server port to 8025
- Change default server port from 8080 to 8025 across all configurations.
- Update Dockerfile, docker-compose.yml, and related documentation.
- Ensure all CLI commands and API endpoints reflect the new port.
- Adjust example configurations and health check URLs accordingly.
2026-02-04 13:37:38 +02:00

42 lines
971 B
Docker

# Build stage
FROM golang:1.25-alpine AS builder
# Install build dependencies (SQLite requires CGO)
RUN apk add --no-cache gcc musl-dev sqlite-dev
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the binaries
# CGO is required for mattn/go-sqlite3
RUN mkdir -p bin && \
CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o bin/whatshook-server ./cmd/server && \
CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o bin/whatshook-cli ./cmd/cli
# Runtime stage
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache ca-certificates sqlite-libs tzdata
WORKDIR /app
# Copy binaries from builder
COPY --from=builder /build/bin ./bin
# Create necessary directories
RUN mkdir -p /app/sessions /app/data/media /app/data/certs
# Expose the default server port
EXPOSE 8025
# Run the server
ENTRYPOINT ["/app/bin/whatshook-server"]
CMD ["-config", "/app/config.json"]