parent
b5091cc5e1
commit
5d36d0ecf9
|
@ -0,0 +1,3 @@
|
|||
honk.db*
|
||||
blob.db*
|
||||
./honk
|
|
@ -0,0 +1,17 @@
|
|||
FROM golang:1.16
|
||||
|
||||
RUN apt update && apt install -y libsqlite3-dev && rm -rf /var/cache/apt/*
|
||||
|
||||
RUN mkdir /honk-src
|
||||
COPY *.go docs/ toys/ vendor/ views/ /honk-src/
|
||||
|
||||
WORKDIR /honk-src
|
||||
|
||||
RUN make
|
||||
RUN mv ./honk /bin/honk
|
||||
|
||||
CMD ["/bin/honk", "-datadir", "/honk-data"]
|
||||
|
||||
COPY docker-entrypoint.sh /honk-src/docker-entrypoint.sh
|
||||
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