diff options
| author | Paul Buetow <paul@buetow.org> | 2025-10-02 11:31:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-10-02 11:31:39 +0300 |
| commit | 100c1e6fd4661293333b689b75b364fc07dc2bf4 (patch) | |
| tree | 701de616919066d71c664409f50589f8d2e1c936 /gemfeed/examples/conf/f3s/anki-sync-server/docker-image | |
| parent | 2b034797107660d4d83f8a7acdc55d32db785b82 (diff) | |
Update content for md
Diffstat (limited to 'gemfeed/examples/conf/f3s/anki-sync-server/docker-image')
3 files changed, 0 insertions, 76 deletions
diff --git a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Dockerfile b/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Dockerfile deleted file mode 100644 index 81fad856..00000000 --- a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM rust:1.85.0-alpine3.20 AS builder - -ARG ANKI_VERSION - -RUN apk update && apk add --no-cache build-base protobuf && rm -rf /var/cache/apk/* - -RUN cargo install --git https://github.com/ankitects/anki.git \ ---tag ${ANKI_VERSION} \ ---root /anki-server \ ---locked \ -anki-sync-server - -FROM alpine:3.21.0 - -# Default PUID and PGID values (can be overridden at runtime). Use these to -# ensure the files on the volume have the permissions you need. -ENV PUID=1000 -ENV PGID=1000 - -COPY --from=builder /anki-server/bin/anki-sync-server /usr/local/bin/anki-sync-server - -RUN apk update && apk add --no-cache bash su-exec && rm -rf /var/cache/apk/* - -EXPOSE 8080 - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["anki-sync-server"] - -# This health check will work for Anki versions 24.08.x and newer. -# For older versions, it may incorrectly report an unhealthy status, which should not be the case. -HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget -qO- http://127.0.0.1:8080/health || exit 1 - -VOLUME /anki_data - -LABEL maintainer="Jean Khawand <jk@jeankhawand.com>" diff --git a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Justfile b/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Justfile deleted file mode 100644 index 5da854f3..00000000 --- a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/Justfile +++ /dev/null @@ -1,6 +0,0 @@ -all: - docker build -t anki-sync-server:25.07.5b --build-arg ANKI_VERSION=25.07.5 . -f3s: - docker build -t anki-sync-server:25.07.5b --build-arg ANKI_VERSION=25.07.5 . - docker tag anki-sync-server:25.07.5b r0.lan.buetow.org:30001/anki-sync-server:25.07.5b - docker push r0.lan.buetow.org:30001/anki-sync-server:25.07.5b diff --git a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/entrypoint.sh b/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/entrypoint.sh deleted file mode 100644 index 9a72cca3..00000000 --- a/gemfeed/examples/conf/f3s/anki-sync-server/docker-image/entrypoint.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -set -o errexit -set -o nounset -set -o pipefail - -# Default PUID and PGID if not provided -export PUID=${PUID:-1000} -export PGID=${PGID:-1000} - -# These values are fixed and cannot be overwritten from the outside for -# convenience and safety reasons -export SYNC_PORT=8080 -export SYNC_BASE=/anki_data - -# Check if group exists, create if not -if ! getent group anki-group > /dev/null 2>&1; then - addgroup -g "$PGID" anki-group -fi - -# Check if user exists, create if not -if ! id -u anki > /dev/null 2>&1; then - adduser -D -H -u "$PUID" -G anki-group anki -fi - -# Fix ownership of mounted volumes -mkdir -p /anki_data -#chown anki:anki-group /anki_data - -# Run the provided command as the `anki` user -exec su-exec anki "$@" - |
