feat: plantilla base workspace SaaS
This commit is contained in:
34
frontend/Dockerfile
Normal file
34
frontend/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Instalar dependencias del sistema necesarias para healthchecks
|
||||
RUN apk update && apk add --no-cache ca-certificates wget && update-ca-certificates
|
||||
|
||||
# Copiar package files
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Instalar pnpm
|
||||
RUN npm config set strict-ssl false
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Instalar dependencias
|
||||
RUN pnpm install
|
||||
|
||||
# Entrypoint (espera API backend en dev; no montar desde el host)
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Copiar código
|
||||
COPY . .
|
||||
|
||||
# Build (para producción)
|
||||
# RUN pnpm run build
|
||||
|
||||
# Exponer puerto
|
||||
EXPOSE 5173
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# Comando por defecto (desarrollo)
|
||||
CMD ["pnpm", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||
Reference in New Issue
Block a user