mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-19 07:43:55 +02:00
* Add Nginx and Certbot services to Docker Compose - Introduced Nginx service with custom configuration for handling HTTP and HTTPS traffic, including volume mounts for templates and entrypoint script. - Added Certbot service for automated SSL certificate management, with a renewal loop and environment variable support for domain and email. - Updated existing services to include restart policies and removed unnecessary port mappings for backend and client services. - Enhanced volume management by adding certbot-conf and certbot-www for certificate storage and challenge handling. * remove volume * Replace Nginx and Certbot with Caddy in Docker Compose - Removed Nginx and Certbot services, streamlining the configuration for SSL management. - Introduced Caddy service with automatic HTTPS support and simplified volume management. - Updated environment variables for domain and email configuration, ensuring compatibility with Caddy's setup. - Enhanced volume definitions for persistent data and configuration storage. * Fix * Fix * Remove Nginx and Certbot configurations from Docker setup - Deleted Nginx and Certbot Dockerfiles, entrypoint scripts, and associated configuration files to streamline the project. - Updated docker-compose.yml to remove Certbot email configuration, reflecting the transition to Caddy for SSL management. * Remove version declaration from docker-compose.yml to simplify configuration * Refactor login page to simplify account creation prompt - Removed conditional rendering for the sign-up link, ensuring it is always displayed for better user accessibility. * Update self-hosting documentation for Frogstats - Revamped the self-hosting guide to provide clearer instructions for setting up Frogstats. - Added prerequisites section detailing requirements such as a Linux VPS, domain name, Docker, and Git. - Enhanced setup steps with detailed commands for installing Docker and Git, cloning the repository, and running the setup script. - Included a callout for compatibility with Ubuntu 24 LTS and emphasized the importance of HTTPS for tracking scripts.
55 lines
No EOL
1.4 KiB
Docker
55 lines
No EOL
1.4 KiB
Docker
FROM node:20-alpine AS base
|
|
|
|
# Install dependencies only when needed
|
|
FROM base AS deps
|
|
RUN apk add --no-cache libc6-compat
|
|
WORKDIR /app
|
|
|
|
# Install dependencies based on the preferred package manager
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci --legacy-peer-deps
|
|
|
|
# Rebuild the source code only when needed
|
|
FROM base AS builder
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
# Next.js collects completely anonymous telemetry data about general usage.
|
|
# Learn more here: https://nextjs.org/telemetry
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
|
ARG NEXT_PUBLIC_BACKEND_URL
|
|
ENV NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}
|
|
ENV CLOUD=${CLOUD}
|
|
|
|
RUN npm run build
|
|
|
|
# Production image, copy all the files and run next
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV production
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
|
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 nextjs
|
|
|
|
COPY --from=builder /app/public ./public
|
|
|
|
# Set the correct permission for prerender cache
|
|
RUN mkdir .next
|
|
RUN chown nextjs:nodejs .next
|
|
|
|
# Automatically leverage output traces to reduce image size
|
|
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
USER nextjs
|
|
|
|
EXPOSE 3002
|
|
|
|
ENV PORT 3002
|
|
ENV HOSTNAME "0.0.0.0"
|
|
|
|
CMD ["node", "server.js"] |