This project is a Go-based quiz management system with a TailwindCSS frontend, templated views, and a SQLite database. The project is set up to run in both development and production environments using Docker.
- Docker and Docker Compose installed on your system.
- WSL2 or Windows setup (if running on Windows).
- Build and run the development environment:
docker-compose up --build
This command will:
- Start the Go application with hot reloading.
- Watch and compile TailwindCSS.
- Watch and generate Templ views.
- Watch and compile JavaScript with esbuild.
- Access the application:
The application will be available at http://localhost:4000
.
- Stopping the development environment:
Press Ctrl+C
or run:
docker-compose down
- Build the production Docker image:
docker build -t quiz-go-app .
- Run the production container:
docker run -p 4000:4000 quiz-go-app
- Access the production application:
The application will be available at http://localhost:4000
.
- Dockerfile: Production Docker setup.
- Dockerfile.dev: Development Docker setup with hot reloading.
- docker-compose.yml: Configuration for running the development environment with Docker Compose.
- Makefile: Local development tasks for CSS, JS, and Templ.
- public/: Static files served by the application.
- views/: Templ views and CSS files.
- database/: SQLite database file.
- If you are running on WSL or Windows, make sure Docker is configured to use WSL2 for better performance.
- If you encounter permission issues with mounted volumes, ensure that your WSL or Docker Desktop has the correct permissions.