Reorganize folder

This commit is contained in:
2026-02-02 12:45:48 +07:00
parent 4d8633bee3
commit b0e34e34fa
4 changed files with 1 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1
# Build stage
FROM golang:1.22-alpine AS builder
WORKDIR /app
# Copy go mod files and download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the application
COPY . .
# Build the application
RUN go build -o mqtt_presence_redis_go mqtt_presence_redis_go.go
# Runtime stage
FROM alpine:3.20
WORKDIR /app
COPY --from=builder /app/mqtt_presence_redis_go .
# Expose default MQTT port if needed
EXPOSE 1883
# Command to run the binary
CMD ["./mqtt_presence_redis_go"]