mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-14 07:33:53 +02:00
feat:#36 added protobuf for golang microservices
This commit is contained in:
@@ -19,12 +19,14 @@ FROM golang:alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache --update go gcc g++
|
||||
# Copy the source from the current directory to the Working Directory inside the container
|
||||
COPY . ./
|
||||
# download needed modules
|
||||
RUN apk add --no-cache --update go gcc g++ && \
|
||||
go mod download && \
|
||||
CGO_ENABLED=1 GOOS=linux go build -o /htwkalender-ical
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY ical/*.go ./ical/
|
||||
COPY ical/. ./ical
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o /htwkalender-ical ical/main.go
|
||||
|
||||
# production stage
|
||||
FROM alpine:latest AS prod
|
||||
@@ -57,14 +59,14 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy the source from the current directory to the Working Directory inside the container
|
||||
COPY *.go ./
|
||||
COPY . .
|
||||
COPY ical/*.go ./ical/
|
||||
COPY ical/. ./ical
|
||||
|
||||
# Build the Go app
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o /htwkalender-ical
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o /htwkalender-ical ical/main.go
|
||||
|
||||
# Expose port 8091 to the outside world
|
||||
EXPOSE 8091
|
||||
|
||||
# Entry point
|
||||
ENTRYPOINT ["./htwkalender-ical"]
|
||||
ENTRYPOINT ["./main"]
|
Reference in New Issue
Block a user