-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
82 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,16 @@ | ||
FROM golang:1.18.3 as builder | ||
# syntax=docker/dockerfile:1 | ||
|
||
# build flibgolite | ||
COPY . /flibgolite | ||
WORKDIR /flibgolite | ||
RUN go build ./cmd/flibgolite | ||
|
||
FROM alpine:3.16.0 | ||
COPY --from=builder /flibgolite/flibgolite /flibgolite/flibgolite | ||
|
||
# run flibgolite with musl instead of glibc | ||
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 | ||
# build dp | ||
FROM --platform=$BUILDPLATFORM scratch | ||
# FROM gcr.io/distroless/static-debian12 | ||
# FROM --platform=$BUILDPLATFORM alpine | ||
|
||
# configure service and directories | ||
RUN mkdir -p /flibgolite/config /var/flibgolite | ||
COPY ops/docker-config.yml /flibgolite/config/config.yml | ||
ARG TARGETOS TARGETARCH TARGETVARIANT | ||
COPY ./bin/flibgolite-$TARGETOS-$TARGETARCH${TARGETVARIANT:+-${TARGETVARIANT#v}} /flibgolite/flibgolite | ||
|
||
# expose ports | ||
EXPOSE 8085 | ||
|
||
# probes | ||
HEALTHCHECK --interval=30s --timeout=3s \ | ||
CMD wget --no-verbose --tries=1 --spider http://localhost:8085/opds || exit 1 | ||
|
||
WORKDIR /flibgolite | ||
# run command | ||
ENTRYPOINT ["/flibgolite/flibgolite"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# the script runs flibgolite docker container | ||
|
||
# run this script from the root of the app folder | ||
|
||
# put your books in the "books" folder | ||
books_dir=$(pwd)/books | ||
mkdir -p $books_dir | ||
|
||
# here you can view logs | ||
logs_dir=$(pwd)/logs | ||
mkdir -p $logs_dir | ||
|
||
# here is your books index database. Back up it if you want | ||
dbdata_dir=$(pwd)/dbdata | ||
mkdir -p $dbdata_dir | ||
|
||
|
||
docker run -d \ | ||
--name=flibgolite \ | ||
-p 8085:8085 \ | ||
--mount type=bind,source=$books_dir,target=/flibgolite/books \ | ||
--mount type=bind,source=$dbdata_dir,target=/flibgolite/dbdata \ | ||
--mount type=bind,source=$logs_dir,target=/flibgolite/logs \ | ||
vinser/flibgolite:latest |
This file was deleted.
Oops, something went wrong.