Dockerfile arreglao

This commit is contained in:
Amin Chaloukh 2024-10-17 20:18:21 +02:00
parent 51fdd88378
commit a551d70bd4
3 changed files with 16 additions and 8 deletions

View File

@ -1,13 +1,21 @@
FROM alpine:3.14
RUN apk update && apk add --no-cache nodejs npm make g++
# Usar la versión más reciente de Node.js sobre Alpine
FROM node:current-alpine
# Establecer el directorio de trabajo dentro del contenedor
WORKDIR /app
COPY . .
# Copiar los archivos necesarios
COPY package*.json ./
# Instalar las dependencias
RUN npm install
CMD ["npm", "run", "build"]
# Copiar el resto del código fuente
COPY . .
# Exponer el puerto que Vite utiliza (5173)
EXPOSE 5173
# Comando para iniciar el servidor de desarrollo
CMD ["npm", "run", "dev"]
EXPOSE 8080

View File

@ -4,7 +4,7 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host",
"build": "tsc -b && vite build",
"preview": "vite preview"
},

View File

@ -5,7 +5,7 @@ import Navbar from "../partials/Navbar";
import Loader from "../partials/Loader";
import Api from "../helpers/Api";
import Card from "../partials/Card";
import { FaSolidLocationDot, FaSolidLocationPin, FaSolidMapLocationDot, FaSolidWater } from "solid-icons/fa";
import { FaSolidLocationDot, FaSolidMapLocationDot, FaSolidWater } from "solid-icons/fa";
interface CustomParams extends Params {
id: string;