Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ DB_PORT=55432 \
BACKEND_PORT=58080 \
FRONTEND_PORT=53000 \
BACKEND_DOMAIN=http://localhost:58080 \
OPS_FRONTEND_URL=http://localhost:53000 \
docker compose --profile setup up --build
Comment thread
fpigeonjr marked this conversation as resolved.
```

Expand All @@ -130,6 +131,9 @@ Port variables and their defaults:
| `BACKEND_PORT` | `8080` | Flask API host port |
| `FRONTEND_PORT` | `3000` | Frontend host port |
| `BACKEND_DOMAIN` | `http://localhost:8080` | Backend URL used by the frontend container |
| `OPS_FRONTEND_URL` | `http://localhost:3000` | Frontend origin allowed by backend CORS and Referer validation |

> **Note:** `OPS_FRONTEND_URL` must match the origin the browser uses to reach the frontend. When `FRONTEND_PORT` is set, Compose derives `OPS_FRONTEND_URL` automatically (e.g., `FRONTEND_PORT=53000` → `http://localhost:53000`). Only set `OPS_FRONTEND_URL` explicitly when the browser uses a different host or scheme — otherwise login will fail with CORS errors.

### RSA Key Generation (Required Setup)

Expand Down
2 changes: 1 addition & 1 deletion backend/ops_api/ops/environment/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
JWT_ENCODE_AUDIENCE = "https://opre-ops-frontend-dev"

# OPS-FRONTEND
OPS_FRONTEND_URL = "http://localhost:3000"
OPS_FRONTEND_URL = os.getenv("OPS_FRONTEND_URL", "http://localhost:3000")

AUTHLIB_OAUTH_CLIENTS = {
"logingov": {
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ services:
- JWT_PRIVATE_KEY
- JWT_PUBLIC_KEY
- OPS_CONFIG=environment/local/container.py
- OPS_FRONTEND_URL=${OPS_FRONTEND_URL:-http://localhost:${FRONTEND_PORT:-3000}}
volumes:
- ./backend/ops_api/ops:/home/app/ops_api/ops
depends_on:
Expand Down
Loading