Files
delivery-tracker/frontend/Dockerfile
Egor Pozharov 4e0899d3ce chore: restructure project into backend and frontend folders
- Move all frontend code to frontend/ directory
- Add backend/ with Go project structure (cmd, internal, pkg)
- Add docker-compose.yml for orchestration
2026-04-14 13:14:28 +06:00

30 lines
513 B
Docker

# syntax=docker/dockerfile:1
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Copy source code
COPY . .
# Build application
RUN yarn build
# Stage 2: Production
FROM nginx:alpine AS production
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copy built files from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]