chore(compose): remove deprecated root docker-compose files (moved to deployments/)
This commit is contained in:
parent
1aed78839b
commit
3d58387207
3 changed files with 0 additions and 243 deletions
|
|
@ -1,28 +0,0 @@
|
|||
# Simple Secure Homelab Override
|
||||
# Use with: docker-compose -f docker-compose.yml -f docker-compose.homelab-secure-simple.yml up -d
|
||||
|
||||
services:
|
||||
api-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: build/docker/test.Dockerfile
|
||||
volumes:
|
||||
- ./data:/data/experiments
|
||||
- ./logs:/logs
|
||||
- ./configs/environments/config-homelab-secure.yaml:/app/configs/config.yaml:ro
|
||||
- ./ssl:/app/ssl:ro
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- REDIS_PASSWORD=your-redis-password
|
||||
- LOG_LEVEL=info
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9101/health"]
|
||||
|
||||
redis:
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
# Secure Homelab Docker Compose Configuration
|
||||
# Use with: docker-compose -f docker-compose.yml -f docker-compose.homelab-secure.yml up -d
|
||||
|
||||
services:
|
||||
api-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: build/docker/simple.Dockerfile
|
||||
container_name: ml-experiments-api
|
||||
ports:
|
||||
- "9101:9101"
|
||||
- "9100:9100" # Prometheus metrics endpoint
|
||||
volumes:
|
||||
- ./data:/data/experiments
|
||||
- ./logs:/logs
|
||||
- ./ssl:/app/ssl:ro
|
||||
- ./configs/environments/config-homelab-secure.yaml:/app/configs/config.yaml:ro
|
||||
- ./.env.secure:/app/.env.secure:ro
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- LOG_LEVEL=info
|
||||
# Load secure environment variables
|
||||
- JWT_SECRET_FILE=/app/.env.secure
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-k", "-f", "https://localhost:9101/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
labels:
|
||||
logging: "promtail"
|
||||
job: "api-server"
|
||||
networks:
|
||||
- ml-experiments-network
|
||||
# Add internal network for secure communication
|
||||
- ml-backend-network
|
||||
|
||||
# Add a reverse proxy for additional security
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: ml-experiments-nginx
|
||||
ports:
|
||||
- "443:443"
|
||||
- "80:80" # Redirect to HTTPS
|
||||
volumes:
|
||||
- ./nginx/nginx-secure.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./ssl:/etc/nginx/ssl:ro
|
||||
depends_on:
|
||||
- api-server
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ml-experiments-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Redis with authentication
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: ml-experiments-redis
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379" # Bind to localhost only
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
- ./redis/redis-secure.conf:/usr/local/etc/redis/redis.conf:ro
|
||||
restart: unless-stopped
|
||||
command: redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD:-your-redis-password}
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "--no-auth-warning", "-a", "${REDIS_PASSWORD:-your-redis-password}", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
networks:
|
||||
- ml-backend-network
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-your-redis-password}
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
ml-experiments-network:
|
||||
external: true
|
||||
ml-backend-network:
|
||||
external: true
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
# Homelab Docker Compose with Centralized Monitoring
|
||||
# Includes: API, Redis, Prometheus, Grafana, Loki
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: ml-experiments-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
restart: unless-stopped
|
||||
command: redis-server --appendonly yes
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "ping" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
api-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: build/docker/simple.Dockerfile
|
||||
container_name: ml-experiments-api
|
||||
ports:
|
||||
- "9101:9101"
|
||||
- "9100:9100" # Prometheus metrics endpoint
|
||||
volumes:
|
||||
- ./data:/data/experiments
|
||||
- ./logs:/logs
|
||||
- ./configs/environments/config-local.yaml:/app/configs/config.yaml
|
||||
- ./ssl:/app/ssl
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
command: ["/usr/local/bin/api-server", "-config", "/app/configs/config.yaml"]
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- LOG_LEVEL=info
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-k", "https://localhost:9101/health" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
labels:
|
||||
logging: "promtail"
|
||||
job: "api-server"
|
||||
|
||||
# Prometheus - Metrics collection
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: ml-experiments-prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
restart: unless-stopped
|
||||
|
||||
# Grafana - Visualization
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: ml-experiments-grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
|
||||
- ./monitoring/dashboards:/var/lib/grafana/dashboards
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
- GF_SERVER_ROOT_URL=http://localhost:3000
|
||||
- GF_AUTH_ANONYMOUS_ENABLED=false
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- prometheus
|
||||
- loki
|
||||
|
||||
# Loki - Log aggregation
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
container_name: ml-experiments-loki
|
||||
ports:
|
||||
- "3100:3100"
|
||||
volumes:
|
||||
- ./monitoring/loki-config.yml:/etc/loki/local-config.yaml
|
||||
- loki_data:/loki
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
restart: unless-stopped
|
||||
|
||||
# Promtail - Log collector
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
container_name: ml-experiments-promtail
|
||||
volumes:
|
||||
- ./monitoring/promtail-config.yml:/etc/promtail/config.yml
|
||||
- ./logs:/var/log/app
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- loki
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
driver: local
|
||||
prometheus_data:
|
||||
driver: local
|
||||
grafana_data:
|
||||
driver: local
|
||||
loki_data:
|
||||
driver: local
|
||||
|
||||
Loading…
Reference in a new issue