55 lines
1.6 KiB
Markdown
55 lines
1.6 KiB
Markdown
# Nakama Local Development Setup Checklist
|
|
|
|
## Prerequisites
|
|
- [ ] Docker Desktop installed (Windows/Mac)
|
|
- [ ] Docker Desktop running
|
|
- [ ] SSH client available (for localhost.run tunneling)
|
|
|
|
## Setup Steps
|
|
|
|
### 1. Create docker-compose.yaml
|
|
- [ ] Create `server/docker-compose.yaml` in project root
|
|
- [ ] Configure Nakama service (port 7350)
|
|
- [ ] Configure PostgreSQL service (port 5432)
|
|
- [ ] Set up persistent volumes for PostgreSQL data
|
|
|
|
### 2. Start Nakama Locally
|
|
- [ ] Open terminal in `server/` directory
|
|
- [ ] Run `docker-compose up -d`
|
|
- [ ] Verify Nakama console at http://localhost:7351
|
|
- [ ] Test API endpoint at http://localhost:7350
|
|
|
|
### 3. Tunnel for Remote Testing
|
|
- [ ] Run: `ssh -R 80:localhost:7350 nokey@localhost.run`
|
|
- [ ] Copy the generated public URL (e.g., `https://xxxxx.lhr.life`)
|
|
- [ ] Update `nakama_manager.gd` with tunnel URL for testing
|
|
|
|
### 4. Configure Godot Client
|
|
- [ ] Update `NAKAMA_HOST` in `nakama_manager.gd`
|
|
- [ ] For local: `localhost`, port `7350`, scheme `http`
|
|
- [ ] For tunnel: use tunnel hostname, port `443`, scheme `https`
|
|
|
|
### 5. PostgreSQL Learning Notes
|
|
- [ ] Database: `nakama` (created by Nakama on startup)
|
|
- [ ] Access via: `docker exec -it nakama-postgres psql -U postgres -d nakama`
|
|
- [ ] Key tables: `users`, `user_edge`, `storage`, `leaderboard`, `wallet_ledger`
|
|
|
|
## Quick Commands
|
|
|
|
```bash
|
|
# Start services
|
|
docker-compose up -d
|
|
|
|
# Stop services
|
|
docker-compose down
|
|
|
|
# View logs
|
|
docker-compose logs -f nakama
|
|
|
|
# Access PostgreSQL
|
|
docker exec -it nakama-postgres psql -U postgres -d nakama
|
|
|
|
# Tunnel port 7350
|
|
ssh -R 80:localhost:7350 nokey@localhost.run
|
|
```
|