Prepare CI and deployment scaffolding
This commit is contained in:
		
							
								
								
									
										50
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										50
									
								
								README.md
									
									
									
									
									
								
							| @@ -55,12 +55,18 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo | ||||
|    cd MerchantsOfHope-SupplyANdDemandPortal | ||||
|    ``` | ||||
|  | ||||
| 2. **Start the application** | ||||
| 2. **Copy environment template** | ||||
|    ```bash | ||||
|    cp .env.example .env | ||||
|    ``` | ||||
|    The defaults support Docker-based development. Adjust values as needed for local tooling or deployment pipelines. | ||||
|  | ||||
| 3. **Start the application with Docker (recommended for parity)** | ||||
|    ```bash | ||||
|    docker-compose up --build | ||||
|    ``` | ||||
|  | ||||
| 3. **Initialize the database** | ||||
| 4. **Initialize the database** | ||||
|    ```bash | ||||
|    # Run database migrations | ||||
|    docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run migrate | ||||
| @@ -69,11 +75,31 @@ A comprehensive SAAS application for managing recruiter workflows, built with mo | ||||
|    docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run seed | ||||
|    ``` | ||||
|  | ||||
| 4. **Access the application** | ||||
| 5. **Access the application** | ||||
|    - Frontend: http://localhost:3000 | ||||
|    - Backend API: http://localhost:3001 | ||||
|    - Database: localhost:5432 | ||||
|  | ||||
| ### Alternative: Native Node.js workflow | ||||
|  | ||||
| If you prefer running services outside Docker: | ||||
|  | ||||
| ```bash | ||||
| # Install dependencies | ||||
| cd backend && npm install | ||||
| cd ../frontend && npm install | ||||
|  | ||||
| # Start backend (uses .env) | ||||
| cd ../backend | ||||
| npm run dev | ||||
|  | ||||
| # In a separate terminal start frontend | ||||
| cd ../frontend | ||||
| npm start | ||||
| ``` | ||||
|  | ||||
| Ensure a PostgreSQL instance is running and the `DATABASE_URL` in `.env` points to it. | ||||
|  | ||||
| ### Demo Accounts | ||||
|  | ||||
| The application comes with pre-seeded demo accounts: | ||||
| @@ -140,9 +166,23 @@ docker-compose exec merchantsofhope-supplyanddemandportal-backend npm run test:w | ||||
| docker-compose exec merchantsofhope-supplyanddemandportal-frontend npm test | ||||
| ``` | ||||
|  | ||||
| ## Development | ||||
| To run tests without Docker, execute `npm test` inside `backend/` or `frontend/` after installing dependencies. | ||||
|  | ||||
| ### Project Structure | ||||
| ## Continuous Integration | ||||
|  | ||||
| Gitea Actions configuration lives in `.gitea/workflows/ci.yml`. It: | ||||
| - Runs backend and frontend unit tests on every push or pull request. | ||||
| - Builds Docker images on pushes to the `main` branch, ready to publish to a registry (requires `REGISTRY_*` secrets). | ||||
|  | ||||
| See inline comments in the workflow for required secrets. | ||||
|  | ||||
| ## Deployment | ||||
|  | ||||
| ### Coolify | ||||
|  | ||||
| Follow `docs/COOLIFY_DEPLOYMENT.md` for guidance on connecting this repository to a Coolify environment, configuring secrets, and enabling automated deploys via Gitea CI. | ||||
|  | ||||
| ## Project Structure | ||||
| ``` | ||||
| MerchantsOfHope-SupplyANdDemandPortal/ | ||||
| ├── backend/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user