chore(docker): optimize Dockerfiles and add healthchecks for Coolify deployment

- Add build arguments and environment variables for OAuth client IDs in frontend Dockerfile
- Install wget and add HEALTHCHECK commands to frontend and backend Dockerfiles
- Create non-root user in backend Dockerfile for improved security
- Update docker-compose.yml with healthcheck configurations and dynamic port/environment variable support
- Add network configuration and restart policies to docker-compose services
- Expand .env.example with additional OAuth secrets, ports, and environment variables for Coolify
- Enhance README.md with detailed Coolify deployment instructions and required environment variables table
This commit is contained in:
MUIS1436
2026-01-31 11:06:16 +05:00
parent d5cb1ded3e
commit ab10baf983
5 changed files with 125 additions and 10 deletions

View File

@@ -97,6 +97,41 @@ npm run dev
- **Frontend**: React, TypeScript, Vite, Tailwind CSS, Lucide Icons, Shadcn UI
- **Backend**: Node.js, Express, TypeScript, Axios, Microsoft Graph Client, Google APIs
## Docker & Coolify Deployment
### Local Docker
```bash
# Build and run with Docker Compose
docker-compose up --build
# Access at http://localhost
```
### Coolify Deployment
#### From Public Repository
1. In Coolify, go to **Projects → New → From Git Repository**
2. Select **GitHub/GitLab/Bitbucket** and enter the repo URL
3. Set **Build Pack** to `Docker Compose`
4. Configure environment variables in Coolify's UI
#### From Private Repository
1. In Coolify, go to **Settings → Private Keys** and add your SSH key
2. Create new project with **Private Repository** option
3. Use SSH URL: `git@github.com:username/repo.git`
4. Configure environment variables in Coolify's UI
#### Required Environment Variables (Coolify UI)
| Variable | Description |
|----------|-------------|
| `VITE_MS_CLIENT_ID` | Microsoft/Azure OAuth Client ID |
| `MS_CLIENT_SECRET` | Microsoft/Azure OAuth Secret |
| `VITE_GOOGLE_CLIENT_ID` | Google OAuth Client ID |
| `GOOGLE_CLIENT_SECRET` | Google OAuth Secret |
| `REDIRECT_URI` | `https://yourdomain.com/auth/callback` |
> **Important**: Update your OAuth app redirect URIs in Azure Portal and Google Cloud Console to match your Coolify domain.
## License
ISC