Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Dirk Nederveen | fb41e86d8b | |
Dirk Nederveen | 82a128ecc0 | |
Dirk Nederveen | 82b3e06034 | |
Dirk Nederveen | e2f4c18fff | |
Dirk Nederveen | e1d2ebe219 | |
Dirk Nederveen | 3b1bed8517 | |
Dirk Nederveen | 5d36d0ecf9 |
|
@ -0,0 +1,4 @@
|
|||
honk.db*
|
||||
blob.db*
|
||||
./honk
|
||||
.git*
|
|
@ -0,0 +1,21 @@
|
|||
FROM golang:1.19
|
||||
|
||||
RUN apt update && apt install -y libsqlite3-dev && rm -rf /var/cache/apt/*
|
||||
|
||||
RUN mkdir /honk-src
|
||||
WORKDIR /honk-src
|
||||
|
||||
COPY go.mod go.sum /honk-src/
|
||||
COPY . /honk-src/
|
||||
RUN go get && go mod vendor
|
||||
|
||||
|
||||
RUN make
|
||||
RUN mv ./honk /bin/honk
|
||||
|
||||
CMD ["/bin/honk", "-datadir", "/honk-data"]
|
||||
|
||||
COPY docker-entrypoint.sh /honk-src/docker-entrypoint.sh
|
||||
WORKDIR /honk-data
|
||||
ENTRYPOINT ["/honk-src/docker-entrypoint.sh"]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -r "/honk-data/honk.db" ]; then
|
||||
set -u
|
||||
(
|
||||
echo "$HONK_USERNAME"
|
||||
echo "$HONK_PASSWORD"
|
||||
echo "${HONK_LISTEN_ADDR:-"0.0.0.0:8080"}"
|
||||
echo "${HONK_SERVER_HOSTNAME}"
|
||||
) | honk -datadir "/honk-data" init
|
||||
set +u
|
||||
fi
|
||||
|
||||
exec $*
|
||||
|
Loading…
Reference in New Issue