Deploying Quizmaster
Introduction
Quizmaster is a self-hosted quiz and trivia platform that allows you to create, manage, and host interactive quizzes. Whether you’re running team trivia nights, educational assessments, or corporate training quizzes, Quizmaster provides the tools to engage participants and track results.
Key features of Quizmaster include:
- Quiz Creation: Build custom quizzes with various question types
- Live Hosting: Run real-time trivia events with live scoring
- Multiple Question Types: Support for multiple choice, true/false, and open-ended questions
- Leaderboards: Track scores and display rankings
- Team Support: Create team-based competitions
- Media Support: Include images and audio in questions
- Timer Options: Set time limits for individual questions or entire quizzes
- Results Analytics: Review performance statistics and answer distributions
- Mobile Friendly: Participants can join from any device
This guide walks through deploying Quizmaster on Klutch.sh using Docker, configuring the database, and setting up your quiz platform.
Prerequisites
Before deploying Quizmaster on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Quizmaster configuration
- Basic familiarity with Docker and containerization concepts
Deploying Quizmaster on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
Create Your Dockerfile
Create a Dockerfile in your repository:
FROM node:18-alpine
WORKDIR /app
# Install dependenciesRUN apk add --no-cache git python3 make g++
# Clone Quizmaster repositoryRUN git clone https://github.com/quizmaster/quizmaster.git .
# Install dependenciesRUN npm install
# Build the applicationRUN npm run build
# Environment configurationENV NODE_ENV=productionENV PORT=3000
# Expose the web interfaceEXPOSE 3000
# Start the applicationCMD ["npm", "start"]Push Your Repository to GitHub
Commit and push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “quizmaster”.
Create a New App
Create a new app within your project and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
NODE_ENV | production |
PORT | 3000 |
DATABASE_URL | Your database connection string |
SESSION_SECRET | A secure random string |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 5 GB | Quiz data and results |
/app/uploads | 10 GB | Media files for questions |
Deploy Your Application
Click Deploy to build and start your Quizmaster instance.
Access Quizmaster
Once deployment completes, access your Quizmaster instance at https://your-app-name.klutch.sh.
Creating Your First Quiz
- Log in to the admin panel
- Navigate to “Create Quiz”
- Add a title and description
- Create questions with answer options
- Set time limits and scoring rules
- Publish and share the quiz code with participants
Additional Resources
Conclusion
Deploying Quizmaster on Klutch.sh provides a complete quiz hosting platform with automatic builds, persistent storage, and secure HTTPS access. Create engaging quizzes, host live trivia events, and track participant scores all from your own self-hosted platform.