2026-09-30 23:12:51 +01:00
|
|
|
# YOUreka Tools — landing page + /fingerprint enrollment wizard.
|
|
|
|
|
# Stateless: sessions live in the operator's cookie, and fpagent keeps running
|
|
|
|
|
# on the field laptop (the wizard reaches it at http://127.0.0.1:9000 from the
|
|
|
|
|
# browser, so the container location does not matter).
|
|
|
|
|
#
|
2026-10-01 03:21:05 +01:00
|
|
|
# The encrypted .env.production is baked in; the private key is supplied at
|
|
|
|
|
# runtime and never stored in the image:
|
|
|
|
|
#
|
2026-09-30 23:12:51 +01:00
|
|
|
# docker build -t yreka-tools .
|
2026-10-01 03:21:05 +01:00
|
|
|
# docker run -d -p 4173:4173 --name yreka-tools \
|
|
|
|
|
# --env DOTENV_PRIVATE_KEY_PRODUCTION="$(grep -oP '^DOTENV_PRIVATE_KEY_PRODUCTION=\K.*' .env.keys)" \
|
|
|
|
|
# yreka-tools
|
2026-09-30 23:12:51 +01:00
|
|
|
FROM node:22-alpine
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-10-01 03:21:05 +01:00
|
|
|
RUN npm install -g @dotenvx/dotenvx@1.51.4
|
|
|
|
|
|
2026-09-30 23:12:51 +01:00
|
|
|
COPY tools/package.json tools/package-lock.json ./
|
|
|
|
|
RUN npm ci --omit=dev && npm cache clean --force
|
|
|
|
|
|
2026-10-01 01:13:30 +01:00
|
|
|
COPY tools/server.js tools/yrka-auth.js tools/permit.js tools/cropper.js ./
|
2026-09-30 23:12:51 +01:00
|
|
|
COPY tools/public ./public
|
2026-10-01 03:21:05 +01:00
|
|
|
COPY --chown=node:node .env.production ./
|
2026-09-30 23:12:51 +01:00
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
EXPOSE 4173
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
|
|
|
|
|
CMD wget -qO- http://127.0.0.1:4173/ >/dev/null || exit 1
|
2026-10-01 03:21:05 +01:00
|
|
|
# --strict: fail fast when the private key is missing or decryption fails,
|
|
|
|
|
# instead of starting with unusable credentials.
|
|
|
|
|
CMD ["dotenvx", "run", "-f", ".env.production", "--strict", "--", "node", "server.js"]
|