Files
mice/Dockerfile
angel a0051576c6 Remove PostHog analytics and update dependencies to latest minor versions
- Remove posthog-js and posthog-node dependencies
- Delete PostHogProvider component and lib/posthog.ts
- Remove PostHog configuration from environment files
- Remove PostHog rewrites from next.config.mjs
- Update all npm subdependencies to latest minor versions
- Update @types/react and @types/react-dom overrides to 19.2.9 and 19.2.3
2026-01-25 00:12:04 +00:00

46 lines
1.1 KiB
Docker

# Use Node.js 20 Alpine for smaller image size
FROM node:20-alpine
# Install pnpm globally
RUN npm install -g pnpm@10.12.4
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install
# Copy source code
COPY . .
# Copy README.md to the app directory for documentation
COPY README.md /app/
# Set environment variable placeholders during build
# These will be replaced at runtime with actual values
ENV NEXT_PUBLIC_NAVIDROME_URL=NEXT_PUBLIC_NAVIDROME_URL
ENV NEXT_PUBLIC_NAVIDROME_USERNAME=NEXT_PUBLIC_NAVIDROME_USERNAME
ENV NEXT_PUBLIC_NAVIDROME_PASSWORD=NEXT_PUBLIC_NAVIDROME_PASSWORD
ENV PORT=3000
# Generate git commit hash for build info (fallback if not available)
RUN echo "NEXT_PUBLIC_COMMIT_SHA=docker-build" > .env.local
# Build the application
RUN pnpm build
# Copy entrypoint script
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
# Expose the port
EXPOSE $PORT
# Set entrypoint to replace env vars at runtime
ENTRYPOINT ["entrypoint.sh"]
# Start the application
CMD ["sh", "-c", "pnpm start -p $PORT"]