- Create SQLite database schema with all tables - Implement REST API endpoints for properties, leads, testimonials, FAQ, services - Add seed data with sample properties, testimonials, FAQ - Create Docker configuration for deployment - Add i18n system for translations - Add API client for frontend integration - Create Technical Documentation (TZ.md) - Add detailed README with deployment instructions 🚀 Project is now fully functional: - API: http://localhost:8080/api/* - Properties CRUD with filtering - Lead management - Settings, Testimonials, FAQ, Services APIs - SQLite database with seed data
39 lines
800 B
Docker
39 lines
800 B
Docker
# Use official Bun image
|
|
FROM oven/bun:1.0.35 AS base
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
FROM base AS deps
|
|
COPY package.json bun.lockb* ./
|
|
RUN bun install
|
|
|
|
# Build
|
|
FROM base AS builder
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
# Production image
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=8080
|
|
|
|
# Create data directory for SQLite
|
|
RUN mkdir -p /app/data
|
|
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/src ./src
|
|
COPY --from=builder /app/package.json ./
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
# Expose port
|
|
EXPOSE 8080
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8080/api/settings || exit 1
|
|
|
|
# Start server
|
|
CMD ["bun", "run", "src/server/index.ts"] |