mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-03 20:12:58 +00:00
1.7 KiB
1.7 KiB
Development Setup
Environment Configuration
This project uses separate environment configurations for local development and Docker deployment:
Local Development
- Backend: Uses
.envfile withDB_HOST=localhost - Frontend: Uses
frontend/.envwithVITE_API_URL=http://localhost:8080/api/v1
Docker Deployment
- Backend: Uses
.env.dockerfile withDB_HOST=postgres(Docker network) - Frontend: Uses
frontend/.env.dockerwith same API URLs
Port Configuration
- Backend Port: Determined by
PORTenvironment variable (default: 8080) - Frontend Port: Determined by
FRONTEND_PORTenvironment variable (default: 5173) - PostgreSQL: Port 5432 (configured in docker-compose.yml)
Running the Application
Local Development
# Start PostgreSQL (if not running)
docker run -d --name postgres -p 5432:5432 -e POSTGRES_DB=trackeep -e POSTGRES_USER=trackeep -e POSTGRES_PASSWORD=trackeep123 postgres:15-alpine
# Start backend
cd backend && go run main.go
# Start frontend
cd frontend && npm run dev
Docker Deployment
docker-compose up --build
Environment Variables
Key environment variables that control the application:
PORT: Backend server portFRONTEND_PORT: Frontend development server portDB_TYPE: Database type (postgres)DB_HOST: Database host (localhost for local, postgres for Docker)VITE_DEMO_MODE: Enable/disable demo modeVITE_API_URL: Frontend API base URL
Demo Mode
When VITE_DEMO_MODE=true, the application:
- Auto-populates login form with demo credentials
- Restricts write operations to protect demo data
- Seeds initial demo data on startup
Demo credentials:
- Email: demo@trackeep.com
- Password: demo123