Testing Maestro development
This project includes a containerized development environment with the following features:
- Base Image: Ubuntu 22.04 LTS
- Languages: Python 3 with pip
- Development Tools: Git, Vim, Nano, curl, wget
- Build Tools: GCC, G++, build-essential
- User: Non-root developer user with sudo access
Build and run the development container:
# Build the container
docker build -t maestro-demo-dev .
# Or use docker-compose
docker-compose up -d dev
docker-compose exec dev bash
# Direct run
docker run -it --rm -v $(pwd):/workspace maestro-demo-dev- 3000: Web development
- 8000: Python development server
- 8080: Alternative web server
- 9000: Additional services
Dockerfile: Container definitiondocker-compose.yml: Container orchestration.dockerignore: Build optimizationREADME-container.md: Detailed container documentation
The development environment is ready for application code deployment and testing.
The application requires a questions.json file at the repository root containing quiz questions.
Each question in the JSON array must follow this structure:
{
"id": <integer>, // Unique question identifier
"question": "<string>", // The question text
"answers": [<strings>], // Array of possible answers
"correct": <integer> // Index of the correct answer (0-based)
}[
{
"id": 1,
"question": "What is the capital of France?",
"answers": ["London", "Paris", "Berlin", "Madrid"],
"correct": 1
},
{
"id": 2,
"question": "Which planet is known as the Red Planet?",
"answers": ["Venus", "Jupiter", "Mars", "Saturn"],
"correct": 2
}
]- The
correctindex must be within the bounds of theanswersarray (0 ≤ correct < len(answers)) - The application validates this at startup and when loading questions
- Invalid questions will cause the application to fail with a descriptive error message
The questions.json file must be located at the repository root (same directory as main.go).
- The application loads questions from
questions.jsonat startup or when starting a new quiz - Each quiz session randomly selects exactly 3 questions (defined by
NumQuestionsconstant) - The selection is random for each new quiz session
- If fewer than 3 questions are available, all questions will be used