diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a21f178 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +dist +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a20a479 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Stage 1: Build the Vue App +FROM node:18 AS builder + +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install + +COPY . . +RUN npm run build -- --force + + +# Stage 2: Serve the Built App Using Nginx +FROM nginx:alpine + +WORKDIR /usr/share/nginx/html +RUN rm -rf ./* +COPY --from=builder /app/dist ./ + +# Nginx Config +# COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/src/App.vue b/src/App.vue index ccbf04f..a10582c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,33 +1,20 @@