mirror of
https://github.com/sstent/go-garminconnect.git
synced 2026-01-26 00:52:43 +00:00
sync
This commit is contained in:
14
docker/Dockerfile
Normal file
14
docker/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
# Build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/bin/go-garminconnect ./cmd
|
||||
|
||||
# Final stage
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /app/bin/go-garminconnect .
|
||||
EXPOSE 8080
|
||||
CMD ["./go-garminconnect"]
|
||||
15
docker/docker-compose.yml
Normal file
15
docker/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
go-garminconnect:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- GIN_MODE=release
|
||||
networks:
|
||||
- garmin-net
|
||||
|
||||
networks:
|
||||
garmin-net:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user