feat: Add Deploy

This commit is contained in:
2026-04-04 19:45:01 -05:00
parent 6084d6a092
commit 1514303798
3 changed files with 49 additions and 0 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM node:22-alpine AS build
WORKDIR /web
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:22-alpine AS runtime
WORKDIR /app
# Copiar archivos generados y dependencias necesarias
COPY --from=build /web/dist ./dist
COPY --from=build /web/node_modules ./node_modules
COPY --from=build /web/package.json ./package.json
# Configuración de red interna de Docker
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD ["node", "./dist/server/entry.mjs"]

7
docker-compose.yaml Normal file
View File

@@ -0,0 +1,7 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "4321:4321"

15
nginx.conf Normal file
View File

@@ -0,0 +1,15 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}