diff --git a/Dockerfile b/Dockerfile index b0c0320..0f9f8b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ -FROM node:lts -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . -EXPOSE 3000 -CMD ["npm", "start"] \ No newline at end of file +FROM node:lts AS build + +WORKDIR /build +COPY package.json package.json +COPY package-lock.json package-lock.json +RUN npm ci + +COPY public/ public +COPY src/ src +RUN npm run build +FROM httpd:alpine +WORKDIR /var/www/html +COPY --from=build /build/build/ . + +EXPOSE 80 \ No newline at end of file diff --git a/package.json b/package.json index d11e3ae..0ec9e70 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { "name": "personal-website", - "version": "0.1.0", - "description": "My personal website", - "private": true, + "version": "1.0.1", + "description": "My personal website written in React + styled-components.", "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0",