ide/build/docker/Dockerfile.server
Snider bfd5c59cac
Some checks failed
Security Scan / security (push) Successful in 8s
Test / test (push) Failing after 1m41s
feat: update Wails to alpha 74, add iOS/Android/Docker build support
- Updated wails3 CLI to v3.0.0-alpha.74
- Added build/ios/, build/android/, build/docker/ from new template
- Updated all platform Taskfiles (darwin, linux, windows)
- Fixed Angular versions to ~20.3.16
- Root Taskfile with platform-aware build/package/run
- Binary compiles and runs — system tray appears on macOS

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 13:10:55 +00:00

41 lines
879 B
Text

# Wails Server Mode Dockerfile
# Multi-stage build for minimal image size
# Build stage
FROM golang:alpine AS builder
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache git
# Copy source code
COPY . .
# Remove local replace directive if present (for production builds)
RUN sed -i '/^replace/d' go.mod || true
# Download dependencies
RUN go mod tidy
# Build the server binary
RUN go build -tags server -ldflags="-s -w" -o server .
# Runtime stage - minimal image
FROM gcr.io/distroless/static-debian12
# Copy the binary
COPY --from=builder /app/server /server
# Copy frontend assets
COPY --from=builder /app/frontend/dist /frontend/dist
# Expose the default port
EXPOSE 8080
# Bind to all interfaces (required for Docker)
# Can be overridden at runtime with -e WAILS_SERVER_HOST=...
ENV WAILS_SERVER_HOST=0.0.0.0
# Run the server
ENTRYPOINT ["/server"]