diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b75f16 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:22-alpine AS build +WORKDIR /app +COPY package*.json ./ +RUN corepack enable +RUN pnpm install +COPY . . +RUN pnpm build + +FROM nginx:alpine AS runtime +COPY ./nginx/nginx.conf /etc/nginx/nginx.conf +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 8080 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..37f6ccf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + portfolio: + container_name: portfolio2 + restart: unless-stopped + build: + context: . + dockerfile: Dockerfile + ports: + - ${PORT}:8080