44 lines
1007 B
Markdown
44 lines
1007 B
Markdown
# IAM Front Deployment Guide
|
|
|
|
## 1. Prerequisites
|
|
|
|
- Docker & Docker Compose installed
|
|
- `iam-service` running (and accessible from this host)
|
|
- `.env` file configured (copied from `.env.example`)
|
|
|
|
## 2. Configuration (.env)
|
|
|
|
Ensure `.env` exists in `iam-front/` root.
|
|
|
|
**Critical Variables:**
|
|
|
|
- `IAM_SERVICE_BASE_URL`: URL to access iam-service.
|
|
- **Docker Note**: Do NOT use `localhost` or `127.0.0.1`. Use the host IP (e.g. `http://192.168.1.100:3000`).
|
|
- `CAPTCHA_SECRET`: Secure random string for cookie signing.
|
|
- `PORT`: Optional, defaults to 6020.
|
|
|
|
## 3. Deploy
|
|
|
|
```bash
|
|
cd deploy/docker
|
|
bash start.sh
|
|
```
|
|
|
|
This will:
|
|
1. Validate `.env` configuration (checks for localhost issues).
|
|
2. Build the Docker image.
|
|
3. Start the container with ports mapped (default 6020).
|
|
|
|
## 4. Stop
|
|
|
|
```bash
|
|
cd deploy/docker
|
|
bash stop.sh
|
|
```
|
|
|
|
## 5. Notes
|
|
|
|
- This deployment only includes the `iam-front` service.
|
|
- It assumes `iam-service` is deployed separately.
|
|
- No database or Redis is required for the frontend.
|