base dashboard and login
This commit is contained in:
+7
-16
@@ -1,7 +1,7 @@
|
||||
# -----------------------------------------------------------------------
|
||||
# Stage 1: Build
|
||||
# -----------------------------------------------------------------------
|
||||
FROM golang:1.22-alpine AS builder
|
||||
FROM golang:1.26-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
@@ -26,27 +26,18 @@ RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy binary
|
||||
# Copy binary (web assets embedded at build time)
|
||||
COPY --from=builder /build/crowdsec-dashy .
|
||||
|
||||
# Copy web assets (templates + static)
|
||||
COPY web/ ./web/
|
||||
|
||||
# Non-root user for security
|
||||
RUN addgroup -S csui && adduser -S csui -G csui
|
||||
RUN addgroup -S csui && adduser -S csui -G csui && \
|
||||
mkdir -p /app/config && chown csui:csui /app/config
|
||||
USER csui
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
# Runtime environment — override via docker-compose or -e flags
|
||||
ENV PORT=:8080 \
|
||||
CROWDSEC_API_URL=http://crowdsec:8080 \
|
||||
CROWDSEC_API_LOGIN= \
|
||||
CROWDSEC_API_PASSWORD= \
|
||||
CSCLI_PATH=/usr/local/bin/cscli \
|
||||
UI_USERNAME=admin \
|
||||
UI_PASSWORD=changeme \
|
||||
UI_SESSION_SECRET=please-change-this-to-32-chars!! \
|
||||
POLL_INTERVAL_SEC=15
|
||||
# All settings live in app_config.conf (auto-generated on first run).
|
||||
# CONFIG_FILE tells the app where to look — set in docker-compose.yml.
|
||||
ENV CONFIG_FILE=/app/config/app_config.conf
|
||||
|
||||
ENTRYPOINT ["/app/crowdsec-dashy"]
|
||||
|
||||
Reference in New Issue
Block a user