Files
plane/apps/monitor/Dockerfile
T
4870a6e578 [INFRA-279]: Fix Monitor service exit on wrong license uploads (#4921)
* fix: handle decryption errors gracefully in GetDecryptedJson function

- Replaced os.Exit(1) with an error return to improve error handling during feature flag decryption.

* chore: add project name to goreleaser configuration for prime-monitor

* chore: update Dockerfile base image and dependencies; enhance .gitignore for Go project

- Changed base image in Dockerfile from goreleaser to golang:1.25.1-alpine3.22.
- Added necessary packages and updated the installation command for goreleaser.
- Updated Go version in go.work from 1.22.4 to 1.24.0.
- Expanded .gitignore to include additional Go build artifacts and directories.
- Removed unused import in decryption.go.

* chore: update Go version and adjust module imports in go.work

- Updated Go version from 1.22.4 to 1.24.0.
- Added ./lib/api and ./lib/feat_flag to the use block.
- Removed ./lib/api and ./lib/feat_flag from the previous imports.

* chore: update Go version in Dockerfiles from 1.25.1 to 1.25.4

- Updated the Go base image in both email and monitor Dockerfiles to version 1.25.4-alpine3.22 for improved performance and security.

* chore: update go.work.sum with new module versions and modify decryption error logging

* Update apps/monitor/.gitignore

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
2025-12-01 16:49:16 +05:30

24 lines
514 B
Docker

FROM --platform=$BUILDPLATFORM tonistiigi/binfmt AS binfmt
FROM golang:1.25.4-alpine3.22 AS build
WORKDIR /app
RUN apk update && \
apk upgrade && \
apk add git build-base && \
go install github.com/goreleaser/goreleaser/v2@latest
ARG PRIVATE_KEY
ENV PRIVATE_KEY=$PRIVATE_KEY
COPY . .
RUN goreleaser build --snapshot --clean --single-target --output=./prime-monitor
FROM alpine:latest AS run
WORKDIR /app
COPY --from=build /app/prime-monitor /usr/local/bin/prime-monitor
CMD [ "prime-monitor", "start" ]