summaryrefslogtreecommitdiff
path: root/frontend/Dockerfile
diff options
context:
space:
mode:
authorPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-29 16:07:04 +0100
committerPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-29 16:07:04 +0100
commitb7e09de3cb8709e5456b996984b5de8161202ef6 (patch)
tree7fc0647a9b34b42c760c1a125c90fa221a6578bf /frontend/Dockerfile
parenteb943058e89d38278393bc9da8d9df551be05a30 (diff)
Dockerize app for deployment and development
Diffstat (limited to 'frontend/Dockerfile')
-rw-r--r--frontend/Dockerfile25
1 files changed, 25 insertions, 0 deletions
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
new file mode 100644
index 0000000..0b93a16
--- /dev/null
+++ b/frontend/Dockerfile
@@ -0,0 +1,25 @@
+FROM node:21-alpine as builder
+
+WORKDIR /app
+
+COPY package.json ./
+COPY package-lock.json ./
+COPY src ./src/
+COPY index.html ./
+COPY public ./
+COPY .env ./
+COPY postcss.config.js ./
+COPY tailwind.config.js ./
+COPY tsconfig.json ./
+COPY tsconfig.node.json ./
+COPY vite.config.ts ./
+
+RUN npm ci
+RUN npm run build
+
+FROM nginx:latest
+
+WORKDIR /app
+
+COPY --from=builder /app/dist ./
+COPY ./nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file