Files
coastal_timesheet/DOCKER.md
T
Bizzle b5e7c8796f Initial commit: Coastal Timesheet App with comprehensive features
- Employee name validation for all submissions
- Complete entry validation (all fields required when any field has input)
- Dynamic auto-resizing work description fields
- Optimized field layout (Homeowner → Hours → Work Description)
- Professional PDF generation with validation
- Email/share functionality with validation
- Data import/export capabilities
- Dark/light theme support
- Mobile-responsive design
- Local data persistence
- Multiple entries per day support
- Custom homeowner management
- Comprehensive README with deployment instructions
- Production build ready for web hosting
2025-08-19 08:21:20 -04:00

1.7 KiB

Docker Deployment Guide

Production Deployment

Quick Start

# Build and run the production container
docker-compose up -d

# Access the app at http://localhost:8080

Manual Build

# Build the Docker image
docker build -t coastal-timesheet .

# Run the container
docker run -d -p 8080:80 --name coastal-timesheet coastal-timesheet

Development with Docker

Development Server

# Run development environment
docker-compose -f docker-compose.dev.yml up

# Access the app at http://localhost:5173

Docker Commands

Production

# Start services
docker-compose up -d

# Stop services  
docker-compose down

# View logs
docker-compose logs -f

# Rebuild after changes
docker-compose up -d --build

Development

# Start dev environment
docker-compose -f docker-compose.dev.yml up

# Stop dev environment
docker-compose -f docker-compose.dev.yml down

# Rebuild dev container
docker-compose -f docker-compose.dev.yml up --build

Configuration

Environment Variables

  • NODE_ENV: Set to "production" for production builds
  • Port mapping can be changed in docker-compose.yml

Nginx Configuration

The production container uses nginx to serve static files with:

  • Gzip compression enabled
  • Client-side routing support (SPA)
  • Static asset caching
  • Security headers

Ports

Architecture

The production setup uses a multi-stage build:

  1. Build stage: Compiles the React app using Node.js
  2. Production stage: Serves static files using nginx

This results in a lightweight production image (~25MB) that only contains the compiled app and nginx.