forked from sirkirby/unifi-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-api.yml
More file actions
47 lines (45 loc) · 1.62 KB
/
Copy pathdocker-compose-api.yml
File metadata and controls
47 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Local-dev compose for unifi-api-server.
#
# Independent of docker/docker-compose.yml (which stands up the 3 MCP servers).
# These two compose files can run side-by-side or independently.
#
# Recommended usage: run `./scripts/start-api.sh` from the repo root. It
# wraps `docker compose ... up --build -d` plus the post-boot key
# retrieval and prints the admin URL + key in one shot.
#
# Manual equivalent (if you'd rather not use the wrapper):
# docker compose -f docker/docker-compose-api.yml up --build -d
# docker compose -f docker/docker-compose-api.yml exec \
# unifi-api-server cat /var/lib/unifi-api/bootstrap-admin-key
# open http://localhost:8089/admin/login
#
# Both the disk-encryption key (UNIFI_API_DB_KEY) and the bootstrap admin
# API key are generated on first boot and persisted inside the
# `unifi-api-state` named volume. No `.env` file or shell exports required
# for local development.
#
# Production / shared deployments: set UNIFI_API_DB_KEY explicitly via env
# var or a secret manager. When set, the file-backed fallback is skipped
# entirely.
#
# Wipe and re-bootstrap (regenerates DB key, admin key, registered
# controllers, audit log):
# docker compose -f docker/docker-compose-api.yml down -v
services:
unifi-api-server:
build:
context: ..
dockerfile: apps/api/Dockerfile
container_name: unifi-api-server
restart: unless-stopped
ports:
- "8089:8080"
volumes:
- unifi-api-state:/var/lib/unifi-api
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/v1/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
unifi-api-state: