Move to new db setup

This commit is contained in:
Ryan
2026-09-08 20:31:06 -04:00
parent 78358e0d7b
commit ea46d418bd
18 changed files with 468 additions and 2043 deletions
+17 -79
View File
@@ -5,8 +5,8 @@ services:
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpass}
MYSQL_DATABASE: videodetect
MYSQL_USER: videodetect
MYSQL_DATABASE: ${DB_NAME:-videodetect}
MYSQL_USER: ${DB_USER:-videodetect}
MYSQL_PASSWORD: ${DB_PASSWORD:-videodetect123}
ports:
- "3306:3306"
@@ -25,50 +25,6 @@ services:
limits:
memory: 2G
worker:
build:
context: .
dockerfile: worker/Dockerfile
container_name: videodetect-worker
restart: unless-stopped
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- DB_HOST=mariadb
- DB_PORT=3306
- DB_NAME=videodetect
- DB_USER=videodetect
- DB_PASSWORD=${DB_PASSWORD:-videodetect123}
- CONFIG_PATH=/app/config.yaml
volumes:
- /dev/null:/dev/null # tmpfs mounted at /scratch in container
- nas_input:/data/input:ro
- ${NAS_OUTPUT_PATH:-./output}:/data/output
- ${MODELS_PATH:-./models}:/models
- ${TRAINING_PATH:-./training}:/data/training
tmpfs:
- /scratch:noexec,nosuid,size=100G
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: ["gpu"]
limits:
memory: 24G
networks:
- videodetect-network
depends_on:
mariadb:
condition: service_healthy
healthcheck:
test: ["CMD", "python3", "-c", "import torch; print(torch.cuda.is_available())"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
ui:
build:
context: ./ui
@@ -98,50 +54,32 @@ services:
limits:
memory: 512M
prometheus:
image: prom/prometheus:v2.48.0
container_name: videodetect-prometheus
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: videodetect-api
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
networks:
- videodetect-network
deploy:
resources:
limits:
memory: 1G
grafana:
image: grafana/grafana:10.2.0
container_name: videodetect-grafana
restart: unless-stopped
ports:
- "3000:3000"
- "5001:5000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
- DB_HOST=mariadb
- DB_PORT=3306
- DB_NAME=videodetect
- DB_USER=videodetect
- DB_PASSWORD=${DB_PASSWORD:-videodetect123}
- DANCER_ENVIRONMENT=production
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- ./api:/app
networks:
- videodetect-network
depends_on:
- prometheus
deploy:
resources:
limits:
memory: 512M
mariadb:
condition: service_healthy
volumes:
mariadb_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local
nas_input:
driver: local
driver_opts: