diff --git a/Containerfile b/Containerfile index daac51e..00f45f7 100644 --- a/Containerfile +++ b/Containerfile @@ -14,11 +14,12 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -FROM library/golang:1.21 AS build +FROM alpine:latest AS build +RUN apk add --no-cache go ADD . /go/lockserver WORKDIR /go/lockserver -RUN CGO_ENABLED=0 go build ./cmd/lockserver +RUN go build ./cmd/lockserver -FROM scratch +FROM alpine:latest COPY --from=build /go/lockserver/lockserver /lockserver ENTRYPOINT ["/lockserver"] diff --git a/config/config.go b/config/config.go index ad230e6..b114bf4 100644 --- a/config/config.go +++ b/config/config.go @@ -16,7 +16,7 @@ type Config struct { var C = Config{ ZWaveJSServer: "ws://home-assistant:3000", - SqliteDatabase: "lockserver.db", + SqliteDatabase: "/data/lockserver.db", HTTPBind: ":8080", }