51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
# Docker Compose para Cisco MAC Monitor HTTP Service
|
|
# ==================================================
|
|
|
|
services:
|
|
cisco-mac-http:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.http
|
|
platforms:
|
|
- linux/amd64
|
|
image: cisco-mac-monitor-http:latest
|
|
container_name: cisco-mac-monitor-http
|
|
|
|
# Puerto HTTP
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
# Red del host para acceso a dispositivos locales
|
|
network_mode: host
|
|
|
|
# Variables de entorno
|
|
environment:
|
|
- HTTP_HOST=0.0.0.0
|
|
- HTTP_PORT=8080
|
|
|
|
# Límites de recursos
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.5'
|
|
memory: 256M
|
|
reservations:
|
|
cpus: '0.1'
|
|
memory: 64M
|
|
|
|
# Reinicio automático
|
|
restart: unless-stopped
|
|
|
|
# Logging del contenedor
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
# Ejemplo de uso:
|
|
# docker-compose -f docker-compose.http.yml up -d
|
|
#
|
|
# Test:
|
|
# curl "http://localhost:8080/health"
|
|
# curl "http://localhost:8080/mac-monitor?host=192.168.1.10&username=admin&password=cisco123" |