documentation updates
This commit is contained in:
+14
-8
@@ -89,12 +89,18 @@ Admin users can create mobile build requests, upload platform signing files, run
|
||||
- Build artifact generation only (`.aab` and `.ipa`).
|
||||
- No automatic App Store Connect / Google Play upload.
|
||||
|
||||
## Common tasks
|
||||
## Deployment
|
||||
|
||||
- **Re-skin:** Edit colors in `_variables.scss` only.
|
||||
- **Add a page:** Create component folder → add route in `app.routes.ts` → add nav link (if needed).
|
||||
- **Update content (dev):** Run the API, then use Swagger UI at [http://localhost:8000/docs](http://localhost:8000/docs) to create/update content.
|
||||
- **Update content (seed):** Edit [backend/seed.py](backend/seed.py) and restart the API (autoseed runs on empty DB), or hit `curl -X POST http://localhost:8000/api/admin/reset` to re-seed.
|
||||
- **Run the app (dev):** From the `backend/` directory, set `KMTN_DATABASE_URL=sqlite+aiosqlite:///./kmountain.db`, then `uvicorn app.main:app --reload` + `ng serve` in parallel. Autoseed populates data on first run.
|
||||
- **Run the app (dev container):** Reopen in Container via VS Code.
|
||||
- **Build:** `ng build` → `dist/`.
|
||||
The project uses a single parameterized `docker-compose.yml` driven by customer-specific `.env` files in the `customers/` directory.
|
||||
|
||||
**Deploy all customers:**
|
||||
```bash
|
||||
./deploy-all.sh
|
||||
```
|
||||
|
||||
**Deploy a specific customer:**
|
||||
```bash
|
||||
docker compose --env-file customers/.env.<customer_name> -p <customer_name> up -d --build
|
||||
```
|
||||
|
||||
*Note: Multiple legacy `docker-compose.yml` files have been removed in favor of this template system.*
|
||||
|
||||
@@ -67,10 +67,8 @@ Open [http://localhost:4200](http://localhost:4200) and ensure the backend is ru
|
||||
|
||||
```
|
||||
.
|
||||
├── docker-compose.yml # Dev compose (builds from source)
|
||||
├── docker-compose.prod.yml # Prod override (applied with -f docker-compose.yml -f docker-compose.prod.yml)
|
||||
├── docker-compose.dev.yml # Dev-sidecar compose (dev container)
|
||||
├── Dockerfile # Frontend: Node build stage + Nginx serve stage
|
||||
├── docker-compose.yml # Parameterized base template
|
||||
├── .devcontainer/ # VS Code dev container
|
||||
├── docker-entrypoint.sh # Renders nginx config + config.json from env vars
|
||||
├── nginx.conf.template # Nginx config template (envsubst)
|
||||
├── config.json.template # Runtime API config template (envsubst)
|
||||
@@ -292,11 +290,19 @@ Full interactive API docs at [http://localhost:8000/docs](http://localhost:8000/
|
||||
|
||||
## Deployment
|
||||
|
||||
### Docker Compose (recommended)
|
||||
To deploy a customer environment, use the `deploy-all.sh` script to deploy everyone:
|
||||
|
||||
The app ships as two Docker images — a frontend (Angular + Nginx) and a backend (FastAPI + gunicorn). Build, tag, and push them to your registry, then deploy with Docker Compose.
|
||||
```bash
|
||||
./deploy-all.sh
|
||||
```
|
||||
|
||||
#### Build and push
|
||||
Or deploy a specific customer using their `.env` file:
|
||||
|
||||
```bash
|
||||
docker compose --env-file customers/.env.<customer_name> -p <customer_name> up -d --build
|
||||
```
|
||||
|
||||
The `docker-compose.yml` file is a parameterized template.
|
||||
|
||||
```bash
|
||||
# Frontend
|
||||
|
||||
Reference in New Issue
Block a user