This guide explains how to run Janus using Docker Compose.
- Docker installed on your system
- Docker Compose installed
Before running Docker Compose for the first time, you need to initialize the required files and directories:
# Run the setup script
./docker-setup.shThis script will:
- Create an empty
db.sqlite3file for the SQLite database - Create the
generated_videosdirectory for media files - Copy
.env.exampleto.env(you'll need to add your API keys)
If you prefer to set up manually:
# Create empty database file
touch backend/src/db.sqlite3
# Create media directories
mkdir -p backend/generated_videos
mkdir -p backend/src/media
# Copy environment file
cp backend/.env.example .envEdit the .env file and add your API keys:
# Required: Get your API key from https://makersuite.google.com/app/apikey
GOOGLE_API_KEY=your_actual_api_key_here
# Optional: For media generation (image/video)
MEDIA_GEMINI_API_KEY=your_media_api_key_heredocker compose builddocker compose upOr run in detached mode:
docker compose up -d- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Django Admin: http://localhost:8000/admin/
docker compose downThe docker-compose.yml file mounts several volumes to persist data:
./backend/src/db.sqlite3- SQLite database (persists campaign data)./backend/src/media- User-uploaded media files./backend/generated_videos- AI-generated videos./.env- Environment variables
This error occurs when required files don't exist before Docker tries to mount them. Solution:
- Run the setup script:
./docker-setup.sh - Or manually create the missing files as shown in the Manual Setup section
If you need to run Django migrations inside the container:
# Access the container shell
docker exec -it janus-app /bin/bash
# Run migrations
cd backend/src
python manage.py migrate# View all logs
docker compose logs
# Follow logs in real-time
docker compose logs -f
# View logs for specific service
docker compose logs -f janusTo reset the database, stop the containers and delete the db.sqlite3 file:
docker compose down
rm backend/src/db.sqlite3
touch backend/src/db.sqlite3
docker compose up- The application runs in development mode with hot-reload enabled
- Code changes are reflected immediately (no need to rebuild)
- For production deployment, see the main CLAUDE.md documentation
After starting the application:
- Visit http://localhost:3000 to access the frontend
- Create your first campaign
- Check the backend API at http://localhost:8000/api/
For more detailed information about the application architecture and features, see CLAUDE.md.