This commit is contained in:
Emmanuel Rojas committed 2026-09-18 00:48:53 -05:00
1 parent c99086c4be
commit a663c061e2
3 files changed
-82

No files matched your search

-22
View File
@@ -1,22 +0,0 @@
node_modules
.next
out
npm-debug.log*
.git
.gitignore
.github
.env
.env.*
!.env.example
.vscode
.idea
.DS_Store
Dockerfile
docker-compose.yml
.dockerignore
README.md
-46
View File
@@ -1,46 +0,0 @@
# syntax=docker/dockerfile:1
FROM node:22-alpine AS base
# ---------- Dependencias ----------
FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# ---------- Build (SSR) ----------
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Las variables NEXT_PUBLIC_* se incrustan en el bundle durante el build,
# por lo que deben estar disponibles ANTES de "npm run build".
ARG NEXT_PUBLIC_API_URL=https://control-api.rynext.com.mx
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build
# ---------- Runtime ----------
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
# output: 'standalone' genera un servidor Node autocontenido en .next/standalone
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]
-14
View File
@@ -1,14 +0,0 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-https://control-api.rynext.com.mx}
image: rynext-landing:latest
container_name: rynext-landing
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production