Remove local development README and enhance scripts for cross-platform compatibility

- Deleted `README.md` for local development setup as it was deemed unnecessary.
- Updated `setup-neon.sh`, `start-all.sh`, and `create-service.sh` scripts to source an OS helper for improved cross-platform command execution.
- Modified commands in `init-project.sh` to reflect the new script structure for starting services.
This commit is contained in:
Ho Ngoc Hai
2025-12-27 10:26:04 +07:00
parent 29c40ea681
commit 5ff8035013
6 changed files with 81 additions and 89 deletions

View File

@@ -1,81 +0,0 @@
# Local Development Setup
Docker Compose configuration for local development.
## Prerequisites
- Docker & Docker Compose installed
- Neon account (https://neon.tech) - for database
- Ports available: 80, 6379, 5001, 3000, 3001, 8080
## Initial Setup
### 1. Setup Neon Database
```bash
# Run setup script
./scripts/db/setup-neon.sh
# Or manually:
# 1. Create Neon project at https://neon.tech
# 2. Get connection string from main branch
# 3. Create deployments/local/.env.local:
# DATABASE_URL=postgresql://user:pass@ep-xxx.region.neon.tech/dbname?sslmode=require&pgbouncer=true
```
See [Neon Setup Guide](../../infra/databases/neon/README.md) for details.
### 2. Start Services
```bash
# Start infrastructure (Redis, Traefik - no PostgreSQL needed)
docker-compose up -d
# Run migrations
./scripts/db/migrate.sh auth-service dev
# Seed database (optional)
./scripts/db/seed.sh auth-service
```
## Usage
```bash
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Stop and remove volumes (clean slate)
docker-compose down -v
```
## Services
- **Neon Database**: Cloud-hosted (no local container)
- **Redis**: `localhost:6379`
- **Auth Service**: `localhost:5001`
- **Web Admin**: `http://localhost:3000` or `http://admin.localhost`
- **Web Client**: `http://localhost:3001` or `http://localhost`
- **Traefik Dashboard**: `http://localhost:8080`
## Access
- API Gateway: `http://localhost/api/v1`
- Web Admin: `http://admin.localhost` (via Traefik) or `http://localhost:3000` (direct)
- Web Client: `http://localhost` (via Traefik) or `http://localhost:3001` (direct)
- Traefik Dashboard: `http://localhost:8080`
## Environment Variables
Copy `env.local.example` to `.env.local` and add your Neon DATABASE_URL:
```bash
DATABASE_URL=postgresql://user:pass@ep-xxx.region.neon.tech/dbname?sslmode=require&pgbouncer=true
```
**Note**: PostgreSQL is not included in Docker Compose. All environments use Neon database.