This guide covers Docker setup for DocForge.
git clone https://github.com/jonmartin721/docforge-api.git
cd docforge-api
docker-compose up -dThe API runs on http://localhost:5000. Start the frontend separately:
cd DocumentGenerator.Client
npm install
npm run devFrontend runs on http://localhost:5173.
- Image:
documentgenerator-api(built from source) - Port Mapping:
5000:8080(external:internal) - Environment: Development mode by default
- Database: SQLite with persistent storage
volumes:
- ./data:/app/data # Database persistence
- ./GeneratedDocuments:/app/GeneratedDocuments # PDF outputBoth directories are created automatically if they don't exist.
| Data | Location |
|---|---|
| Database | ./data/documentgenerator.db |
| Generated PDFs | ./GeneratedDocuments/ |
Create a .env file before running:
cp .env.example .envKey variables:
DATABASE_CONNECTION_STRING=Data Source=documentgenerator.db
JWT_SECRET=your-super-secret-key-minimum-32-characters
JWT_ISSUER=DocForge
JWT_AUDIENCE=DocForge
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000The Dockerfile includes PuppeteerSharp Chrome dependencies:
RUN apt-get update && apt-get install -y \
wget \
gnupg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*Chrome is downloaded automatically on first PDF generation.
docker-compose -f docker-compose.prod.yml up -dProduction considerations:
- Use a strong
JWT_SECRET(minimum 32 characters) - Configure secure database connection strings
- Set appropriate CORS origins for your domain
- Use
ASPNETCORE_ENVIRONMENT=Production
| Service | Port | Notes |
|---|---|---|
| Docker API | 5000 | Container maps 5000 → 8080 internal |
| Local API | 5257 | When running dotnet run directly |
| Frontend | 5173 | Vite dev server |