Fix build command in Dockerfile

This commit is contained in:
2025-10-16 21:45:17 -07:00
parent 0749c6a6d3
commit 46b6008981
2 changed files with 7 additions and 8 deletions
+4 -4
View File
@@ -17,7 +17,7 @@ RUN go mod download
COPY . .
# Build binaries
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o grpcserver ./cmd/grpcserver
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server ./cmd/server
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o restserver ./cmd/restserver
# Runtime stage
@@ -34,7 +34,7 @@ RUN addgroup -g 1000 notifier && \
WORKDIR /app
# Copy binaries from builder
COPY --from=builder /build/grpcserver /app/
COPY --from=builder /build/server /app/
COPY --from=builder /build/restserver /app/
# Copy default config (can be overridden with volume mount)
@@ -50,6 +50,6 @@ USER notifier
# Expose ports
EXPOSE 8080 50051 9090 8081
# Default to running both servers
# Default to running the combined server (handles both REST and gRPC)
# Can be overridden with docker run command
CMD ["sh", "-c", "/app/grpcserver & /app/restserver"]
CMD ["/app/server"]