Main Upload

This is the start upload I figured this is a way for me to easily tweak with radio DJ and get the album art
This commit is contained in:
minster586
2026-09-09 05:03:17 -04:00
parent 84c241f661
commit b9a2cc584b
11 changed files with 4151 additions and 14 deletions
+31
View File
@@ -0,0 +1,31 @@
# syntax=docker/dockerfile:1
# ---- Dependencies (better-sqlite3 uses prebuilt binaries on linux-x64 glibc) ----
FROM node:20-slim AS deps
WORKDIR /app
COPY package.json package-lock.json* ./
# Use `npm ci` when a lockfile is present, otherwise fall back to `npm install`.
RUN if [ -f package-lock.json ]; then npm ci --omit=dev; else npm install --omit=dev; fi
# ---- Runtime ----
FROM node:20-slim
ENV NODE_ENV=production \
PORT=3000 \
DATA_DIR=/app/data
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY package.json ./
COPY server.js ./
COPY public ./public
# Persistent SQLite storage lives in /app/data (map a volume or ./data here).
RUN mkdir -p /app/data && chown -R node:node /app
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
CMD ["node", "server.js"]