Files
ebook/Dockerfile
koziavin efade5429b
Some checks failed
Deploy Application / deploy (push) Has been cancelled
first commit
2025-06-11 21:15:10 +04:00

32 lines
665 B
Docker

# Build stage
FROM node:20-alpine as build
WORKDIR /app
# Copy package files
COPY package.json yarn.lock ./
# Install dependencies with increased timeout and retry settings
RUN yarn config set network-timeout 300000 && \
yarn config set network-concurrency 1 && \
yarn install --frozen-lockfile --network-timeout 300000
# Copy source code
COPY . .
# Build the application
RUN yarn build
# Production stage
FROM nginx:alpine
# Copy built assets from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]