-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (31 loc) · 895 Bytes
/
Dockerfile
File metadata and controls
43 lines (31 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM node:20-alpine as build-deps
WORKDIR /usr/src/app
# Copy package files
COPY package*.json ./
# Install dependencies without running prepare scripts
RUN echo "Iniciando install..." && \
npm ci --ignore-scripts && \
echo "Install concluído."
# Copy source code
COPY src/ ./src/
COPY tsconfig.json ./
COPY tsconfig.app.json ./
COPY tsconfig.node.json ./
COPY vite.config.ts ./
COPY postcss.config.js ./
COPY tailwind.config.js ./
COPY index.html ./
COPY components.json ./
COPY public/ ./public/
# Build the application
RUN echo "Iniciando build..." && \
npm run build && \
echo "Build concluído."
FROM nginx:alpine
ENV PUBLIC_HTML=/usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY .docker/nginx.conf /etc/nginx/conf.d/
COPY .docker/start.sh /
COPY --from=build-deps /usr/src/app/dist ${PUBLIC_HTML}
EXPOSE 80
ENTRYPOINT [ "/bin/sh", "/start.sh" ]