Refactor Docker setup and add mock data support
- Updated .dockerignore and .gitignore for better file management. - Introduced .env.example for environment variable configuration. - Added docker-compose.dev.yml for development with mock data and live reload. - Enhanced Dockerfile to include necessary dependencies and entrypoint script. - Created mock_data.py to provide sample data for testing without OpenStack/Prometheus. - Added unit tests for template filters in dashboard. - Cleaned up various files for consistency and improved readability.
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
services:
|
||||
watcher-visio:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./:/app
|
||||
restart: unless-stopped
|
||||
# Base compose: production-like run.
|
||||
# For development with mock data and live reload use:
|
||||
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
|
||||
|
||||
services:
|
||||
watcher-visio:
|
||||
image: watcher-visio:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: watcher-visio
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
# Override via environment or env_file (e.g. env_file: .env):
|
||||
# PROMETHEUS_URL, OPENSTACK_CLOUD, OPENSTACK_REGION_NAME, SECRET_KEY
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user