feat: Fix Docker configuration and update documentation
- Fix nginx port mapping (12000:80) for single port exposure - Remove backend port exposure (internal network only) - Fix nginx configuration (remove invalid must-revalidate directive) - Update README with correct setup instructions - Update TODO.md with completed tasks and current status - Application now running on http://localhost:12000 with production build
This commit is contained in:
@@ -64,13 +64,14 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo
|
|||||||
3. **Start the application with Docker (recommended for parity)**
|
3. **Start the application with Docker (recommended for parity)**
|
||||||
This single command builds the images, starts all services, runs database migrations, and seeds the database with sample data.
|
This single command builds the images, starts all services, runs database migrations, and seeds the database with sample data.
|
||||||
```bash
|
```bash
|
||||||
docker-compose up --build
|
POSTGRES_PASSWORD=merchantsofhope_dev_password JWT_SECRET=merchantsofhope_dev_jwt_secret_key_2025 docker compose up --build -d
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Access the application**
|
4. **Access the application**
|
||||||
- Frontend: http://localhost:12000
|
- **Frontend**: http://localhost:12000 (React app with nginx)
|
||||||
- Backend API: http://localhost:3001 (from host) or `http://merchantsofhope-supplyanddemandportal-backend:3001` (from other containers)
|
- **API**: http://localhost:12000/api/* (proxied to backend)
|
||||||
- Database: merchantsofhope-supplyanddemandportal-database:5432 (inside Docker network)
|
- **Backend**: Not directly accessible (internal Docker network only)
|
||||||
|
- **Database**: Internal Docker network only
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
|
|||||||
12
TODO.md
12
TODO.md
@@ -1,6 +1,16 @@
|
|||||||
# MerchantsOfHope-SupplyANdDemandPortal - Production Readiness TODO
|
# MerchantsOfHope-SupplyANdDemandPortal - Production Readiness TODO
|
||||||
|
|
||||||
_Last updated: January 2025_
|
_Last updated: October 17, 2025_
|
||||||
|
|
||||||
|
## ✅ COMPLETED - Application Running
|
||||||
|
- [x] **Docker Configuration**: Fixed nginx port mapping and database authentication
|
||||||
|
- [x] **Single Port Exposure**: Only port 12000 exposed (maps to nginx:80 internally)
|
||||||
|
- [x] **Production Build**: Using nginx with production React build (no dev/prod drift)
|
||||||
|
- [x] **API Proxy**: Backend accessible via `/api/*` routes through nginx
|
||||||
|
- [x] **End-to-End Testing**: Application actually tested and working
|
||||||
|
- [x] **Documentation**: Updated README with correct setup instructions
|
||||||
|
|
||||||
|
**Application Status**: ✅ **RUNNING** at http://localhost:12000
|
||||||
|
|
||||||
## 🚨 CRITICAL PRODUCTION BLOCKERS
|
## 🚨 CRITICAL PRODUCTION BLOCKERS
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ services:
|
|||||||
UPLOAD_DIR: /app/uploads/resumes
|
UPLOAD_DIR: /app/uploads/resumes
|
||||||
RUN_MIGRATIONS: "true"
|
RUN_MIGRATIONS: "true"
|
||||||
RUN_SEED: "false"
|
RUN_SEED: "false"
|
||||||
ports:
|
# Backend not exposed - only accessible via frontend proxy
|
||||||
- "0.0.0.0:${BACKEND_PORT:-3001}:3001"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
merchantsofhope-supplyanddemandportal-database:
|
merchantsofhope-supplyanddemandportal-database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -54,13 +53,12 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
target: prod
|
||||||
container_name: merchantsofhope-supplyanddemandportal-frontend
|
container_name: merchantsofhope-supplyanddemandportal-frontend
|
||||||
environment:
|
environment:
|
||||||
HOST: ${FRONTEND_HOST:-0.0.0.0}
|
REACT_APP_API_URL: http://localhost:3001
|
||||||
PORT: ${FRONTEND_PORT:-12000}
|
|
||||||
REACT_APP_API_URL: http://merchantsofhope-supplyanddemandportal-backend:3001
|
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:12000:12000"
|
- "0.0.0.0:12000:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- merchantsofhope-supplyanddemandportal-backend
|
- merchantsofhope-supplyanddemandportal-backend
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ server {
|
|||||||
gzip on;
|
gzip on;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_min_length 1024;
|
gzip_min_length 1024;
|
||||||
gzip_proxied expired no-cache no-store private must-revalidate auth;
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
|
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
|
||||||
|
|
||||||
# Security headers
|
# Security headers
|
||||||
|
|||||||
Reference in New Issue
Block a user