Tier Zero C.O.D.E (Tier Zero Correlation of Distributed Endpoints)
2.0K

Tier Zero C.O.D.E is an enterprise-level security dashboard designed to correlate and manage endpoint data from multiple distributed security tools and platforms. It provides a unified view of your organization's endpoints, users, and security posture by integrating with leading security solutions including Microsoft Entra ID, CrowdStrike Falcon, Microsoft Defender for Endpoint, Microsoft Intune, Sophos Central, and Qualys.
Before you begin, ensure you have the following installed:
Docker Install: Latest
andrewixl/tierzerocode:latest
Docker Install: Latest - Dev
andrewixl/tierzerocode:latest-dev
This setup runs everything in Docker Compose, including PostgreSQL and Redis:
docker-compose.yml file:services:
web:
image: docker.io/andrewixl/tierzerocode:latest
ports:
- "${WEB_PORT:-8000}:8000"
environment:
# Django settings
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG:-False}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1}
# Database settings
- DATABASE_HOST=db
- DATABASE_NAME=${DATABASE_NAME:-dockerdjango}
- DATABASE_USER=${DATABASE_USER:-dbuser}
- DATABASE_PASSWORD=${DATABASE_PASSWORD:-dbpassword}
- DATABASE_PORT=${DATABASE_PORT:-5432}
- DATABASE_ENGINE=${DATABASE_ENGINE:-postgresql_psycopg2}
# Redis settings
- REDIS_HOST=redis
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_DB=${REDIS_DB:-0}
depends_on:
- db
- redis
restart: unless-stopped
command: python -m gunicorn --bind 0.0.0.0:8000 --workers ${GUNICORN_WORKERS:-3} tierzerocode.wsgi:application
worker:
image: docker.io/andrewixl/tierzerocode:latest
environment:
# Django settings
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG:-False}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1}
# Database settings
- DATABASE_HOST=db
- DATABASE_NAME=${DATABASE_NAME:-dockerdjango}
- DATABASE_USER=${DATABASE_USER:-dbuser}
- DATABASE_PASSWORD=${DATABASE_PASSWORD:-dbpassword}
- DATABASE_PORT=${DATABASE_PORT:-5432}
- DATABASE_ENGINE=${DATABASE_ENGINE:-postgresql_psycopg2}
# Redis settings
- REDIS_HOST=redis
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_DB=${REDIS_DB:-0}
depends_on:
- db
- redis
restart: unless-stopped
command: python manage.py rqworker default --job-class django_tasks.backends.rq.Job --with-scheduler
db:
image: postgres:17-bookworm
environment:
- POSTGRES_DB=${DATABASE_NAME:-dockerdjango}
- POSTGRES_USER=${DATABASE_USER:-dbuser}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD:-dbpassword}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
command: redis-server --appendonly yes
volumes:
postgres_data:
redis_data:
.env file with your configuration:SECRET_KEY=your-secret-key-here # Generate with: openssl rand -base64 32
DEBUG=False
DJANGO_ALLOWED_HOSTS=ipaddress,yourdomain.com,
DATABASE_NAME=dockerdjango
DATABASE_USER=dbuser
DATABASE_PASSWORD=dbpassword
GUNICORN_WORKERS=3
WEB_PORT=8000
USE_HTTPS=False
sudo docker compose pull
sudo docker compose up -d
sudo docker compose exec web python manage.py migrate
sudo docker compose exec web python manage.py createsuperuser
http://ipaddress:8000 (or your configured WEB_PORT)The following environment variables can be configured in your .env file:
SECRET_KEY - Django secret key (required for production) Generate with: openssl rand -base64 32DEBUG - Enable debug mode (default: False)DJANGO_ALLOWED_HOSTS - Comma-separated list of allowed hostnamesUSE_HTTPS=False - True / FalseDATABASE_HOST - PostgreSQL host (default: db for Docker Compose)DATABASE_NAME - Database name (default: dockerdjango)DATABASE_USER - Database user (default: dbuser)DATABASE_PASSWORD - Database password (default: dbpassword)DATABASE_PORT - Database port (default: 5432)DATABASE_ENGINE - Database engine (default: postgresql_psycopg2)REDIS_HOST - Redis host (default: redis for Docker Compose)REDIS_PORT - Redis port (default: 6379)REDIS_DB - Redis database number (default: 0)GUNICORN_WORKERS - Number of Gunicorn worker processes (default: 3)WEB_PORT - Port to expose the web service (default: 8000)sudo docker compose logs -f web or docker compose logs -f workersudo docker compose downsudo docker compose restart webdocker-compose.yml and use sudo docker compose up -d --scale worker=3The docker compose files use docker.io/andrewixl/tierzerocode:latest by default. To use a specific version:
image: docker.io/andrewixl/tierzerocode:latest-dev
image: docker.io/andrewixl/tierzerocode:v1.0.0 (legacy to be updated)
Database connection errors:
sudo docker compose ps.env fileRedis connection errors:
sudo docker compose ps.env fileStatic files not loading:
sudo docker compose exec web python manage.py collectstatic --noinputWorker not processing jobs:
sudo docker compose logs -f workerPort already in use:
WEB_PORT in .env file to an available portIf you encounter issues not covered here:
sudo docker compose logs -f [service-name]Please submit any issues into the issues section within this GitHub
If you are feeling generous, love the project, or just want to show your appreciation please donated at the Patreon Link Below! https://www.patreon.com/tierzerocode
Distributed under the Apache License Version 2.0. See LICENSE for more information.
Content type
Image
Digest
sha256:3fd54b31f…
Size
107.7 MB
Last updated
8 months ago
docker pull andrewixl/tierzerocode