docker: entrypoint

This commit is contained in:
Anton
2025-07-13 23:33:06 +05:00
parent 6bcbec5754
commit 2692288350
2 changed files with 8 additions and 1 deletions

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
.dockerignore
.git
.gitignore
.vscode/
build/
Dockerfile

View File

@@ -8,10 +8,11 @@ RUN make build
FROM alpine:latest
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main valkey-cli
RUN ln -s /usr/bin/valkey-cli /usr/local/bin/redis-cli
RUN mkdir /data
VOLUME /data
WORKDIR /data
COPY --from=build /app/build/redka /usr/local/bin/redka
HEALTHCHECK CMD valkey-cli PING || exit 1
EXPOSE 6379
CMD ["redka", "-h", "0.0.0.0", "-p", "6379", "redka.db"]
ENTRYPOINT ["redka", "-h", "0.0.0.0", "-p", "6379"]