diff --git a/Dockerfile b/Dockerfile index 3feaa5b..fe9498a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,20 @@ -# ADD DOCKERFILE CONTENTS HERE \ No newline at end of file +FROM node:20-alpine AS build + +# Set working directory +WORKDIR /app + +COPY package*.json ./ +RUN npm install + +COPY . . + +RUN npm run build + + +FROM nginx:alpine + +COPY --from=build /app/build /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index dea1383..1733842 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1 +1,11 @@ -# ADD DOCKER-COMPOSE CONTENTS HERE \ No newline at end of file +version: "3.8" + +services: + react-app: + container_name: react-app + build: + context: . + dockerfile: Dockerfile + ports: + - "8080:80" + restart: always diff --git a/prueba.png b/prueba.png new file mode 100644 index 0000000..58e8262 Binary files /dev/null and b/prueba.png differ