135 lines
3.7 KiB
YAML
135 lines
3.7 KiB
YAML
services:
|
|
|
|
# ── MongoDB ──────────────────────────────────────────────────────────────
|
|
mongo:
|
|
image: mongo:6
|
|
container_name: genieacs-mongo
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
- mongo_config:/data/configdb
|
|
networks:
|
|
- genieacs
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
# ── CWMP — TR-069 protocol handler (porta 7547) ──────────────────────────
|
|
cwmp:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: runtime
|
|
image: genieacs-unifi:latest
|
|
container_name: genieacs-cwmp
|
|
restart: unless-stopped
|
|
command: ["node", "bin/genieacs-cwmp"]
|
|
ports:
|
|
- "7547:7547"
|
|
env_file: .env
|
|
environment:
|
|
GENIEACS_MONGODB_CONNECTION_URL: mongodb://mongo:27017/genieacs
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ext_dir:/opt/genieacs/config/ext
|
|
- logs:/opt/genieacs/logs
|
|
networks:
|
|
- genieacs
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:7547/ || true"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
# ── NBI — Northbound REST API (porta 7557) ───────────────────────────────
|
|
nbi:
|
|
image: genieacs-unifi:latest
|
|
container_name: genieacs-nbi
|
|
restart: unless-stopped
|
|
command: ["node", "bin/genieacs-nbi"]
|
|
ports:
|
|
- "7557:7557"
|
|
env_file: .env
|
|
environment:
|
|
GENIEACS_MONGODB_CONNECTION_URL: mongodb://mongo:27017/genieacs
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
cwmp:
|
|
condition: service_started
|
|
volumes:
|
|
- ext_dir:/opt/genieacs/config/ext
|
|
- logs:/opt/genieacs/logs
|
|
networks:
|
|
- genieacs
|
|
|
|
# ── FS — File Server / GridFS (porta 7567) ───────────────────────────────
|
|
fs:
|
|
image: genieacs-unifi:latest
|
|
container_name: genieacs-fs
|
|
restart: unless-stopped
|
|
command: ["node", "bin/genieacs-fs"]
|
|
ports:
|
|
- "7567:7567"
|
|
env_file: .env
|
|
environment:
|
|
GENIEACS_MONGODB_CONNECTION_URL: mongodb://mongo:27017/genieacs
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
cwmp:
|
|
condition: service_started
|
|
volumes:
|
|
- ext_dir:/opt/genieacs/config/ext
|
|
- logs:/opt/genieacs/logs
|
|
networks:
|
|
- genieacs
|
|
|
|
# ── UI — Web Interface (porta 3000) ──────────────────────────────────────
|
|
ui:
|
|
image: genieacs-unifi:latest
|
|
container_name: genieacs-ui
|
|
restart: unless-stopped
|
|
command: ["node", "bin/genieacs-ui"]
|
|
ports:
|
|
- "3000:3000"
|
|
env_file: .env
|
|
environment:
|
|
GENIEACS_MONGODB_CONNECTION_URL: mongodb://mongo:27017/genieacs
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
nbi:
|
|
condition: service_started
|
|
volumes:
|
|
- ext_dir:/opt/genieacs/config/ext
|
|
- logs:/opt/genieacs/logs
|
|
networks:
|
|
- genieacs
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/ || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
mongo_data:
|
|
driver: local
|
|
mongo_config:
|
|
driver: local
|
|
ext_dir:
|
|
driver: local
|
|
logs:
|
|
driver: local
|
|
|
|
networks:
|
|
genieacs:
|
|
driver: bridge
|