Compare commits

...

7 Commits
main ... docker

Author SHA1 Message Date
Dirk Nederveen fb41e86d8b
Merge branch 'main' into docker 2023-09-14 20:45:22 +02:00
Dirk Nederveen 82a128ecc0
Execute in /honk-data 2023-08-11 07:38:37 +02:00
Dirk Nederveen 82b3e06034
Merge branch 'main' into docker 2023-08-11 07:37:23 +02:00
Dirk Nederveen e2f4c18fff
Merge branch 'main' into docker 2023-08-04 08:55:04 +02:00
Dirk Nederveen e1d2ebe219
Merge branch 'main' into docker 2023-07-16 07:08:24 +02:00
Dirk Nederveen 3b1bed8517
Update dockerfiles 2023-07-07 20:11:45 +02:00
Dirk Nederveen 5d36d0ecf9
Add docker files
Build: docker build
2023-07-07 20:11:44 +02:00
3 changed files with 40 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
honk.db*
blob.db*
./honk
.git*

21
Dockerfile Normal file
View File

@ -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"]

15
docker-entrypoint.sh Executable file
View File

@ -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 $*