Files
tony b96edf0406
Android development APK / apk (push) Has been cancelled
Checks / go (push) Failing after 6s
Container images / publish (., deploy/pocketbase/Dockerfile, evoliohealth-pocketbase) (push) Has been cancelled
Container images / publish (., server/Dockerfile, evoliohealth-server) (push) Has been cancelled
Checks / compose (push) Has been cancelled
Checks / flutter (push) Has been cancelled
test: first build
2026-07-21 21:30:06 +02:00

33 lines
1.0 KiB
Docker

# syntax=docker/dockerfile:1.7
ARG FLUTTER_VERSION=3.44.6
ARG GO_VERSION=1.26.5
ARG ALPINE_VERSION=3.24.1
FROM ghcr.io/cirruslabs/flutter:${FLUTTER_VERSION} AS web-builder
WORKDIR /src/web
COPY web/pubspec.yaml web/analysis_options.yaml ./
RUN flutter pub get
COPY web/ ./
RUN flutter build web --release
FROM golang:${GO_VERSION}-alpine3.24 AS go-builder
WORKDIR /src/server
COPY server/go.mod ./
RUN go mod download
COPY server/ ./
COPY --from=web-builder /src/web/build/web ./cmd/evoliohealth/webdist
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -ldflags="-s -w" -o /out/evoliohealth ./cmd/evoliohealth
FROM alpine:${ALPINE_VERSION}
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -g 1000 evoliohealth \
&& adduser -D -H -u 1000 -G evoliohealth evoliohealth \
&& install -d -o evoliohealth -g evoliohealth /config /data /tmp
COPY --from=go-builder /out/evoliohealth /usr/local/bin/evoliohealth
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/evoliohealth"]