feat(gateway): added first implement of the Gateway (MQTT, Influx, REST)

Signed-off-by: Klagarge <remi@heredero.ch>
This commit is contained in:
2025-04-14 22:39:47 +02:00
parent d33a6a1d02
commit e6ef490314
14 changed files with 928 additions and 0 deletions

27
gateway/Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY ./src/go.mod ./src/go.sum ./
RUN go mod tidy
COPY ./src .
#RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /gateway .
RUN go build -o /gateway .
FROM alpine:latest AS certs
RUN apk --no-cache add ca-certificates
FROM scratch AS final
LABEL org.opencontainers.image.authors="remi.heredero@hevs.ch" \
org.opencontainers.image.title="Gateway for SoftwEng course" \
org.opencontainers.image.description="This container is an application for the lab on SoftwEng course" \
org.opencontainers.image.source="https://gitlab.forge.hefr.ch/team-raclette/project-softweng/-/tree/main/gateway?ref_type=heads"
COPY --from=builder /gateway /gateway
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 8080
ENTRYPOINT ["/gateway"]