ci: Release workflow updates for Dockerfile and changelog generation
Some checks failed
Go / build (push) Successful in -10s
renovate / renovate (push) Successful in 59s
SonarQube Scan / Build and analyze (push) Has been cancelled

This commit is contained in:
2025-03-26 16:23:20 +01:00
parent 3beed131a8
commit d8580bf90f
2 changed files with 94 additions and 22 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use the official Golang image for building
FROM golang:1.23 AS builder
# Set working directory
WORKDIR /app
# Copy Go modules and dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN go build -o gosearch .
# Use a minimal base image for final deployment
FROM alpine:latest
# Set working directory in the container
WORKDIR /root/
# Copy the built binary from the builder stage
COPY --from=builder /app/gosearch .
# Expose the application port
EXPOSE 3000
# Run the application
CMD ["./gosearch"]