Fix Docker build: Install openssl and run as root to fix volume permissions
All checks were successful
Automated Container Build / build-and-push (push) Successful in 53s

This commit is contained in:
Elijah 2026-06-27 20:14:53 -07:00
parent 4df08da263
commit f8de1a4380

View file

@ -19,6 +19,7 @@ ENV NODE_ENV=production
ENV PORT=3726
ENV DATABASE_URL="file:/app/data/study.db"
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
RUN useradd --system --create-home appuser && mkdir -p /app/data && chown -R appuser:appuser /app
COPY --from=builder /app/.next/standalone ./
@ -28,8 +29,8 @@ COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/prisma.config.ts ./
RUN npm install prisma@^7.8.0
COPY docker-entrypoint.sh ./
RUN chmod +x docker-entrypoint.sh && chown -R appuser:appuser /app
USER appuser
RUN chmod +x docker-entrypoint.sh
# Running as root to avoid permission denied on Unraid host-mounted volumes
EXPOSE 3726
VOLUME ["/app/data"]
ENTRYPOINT ["./docker-entrypoint.sh"]