Light Hat Texts is a Django application that allows users to submit and vote on short text messages (up to 8 characters) to be displayed on a LED-covered hat. Users can upvote or downvote messages, and the application will periodically send the most popular text to the LED hat.
- Submit new text messages (up to 8 characters)
- Upvote and downvote messages
- Periodically updates to show the latest messages
- Send texts to a worker queue on a periodic schedule, where they are forwarded to the LED hat
- Docker
- Docker Compose
- Ensure Docker and Docker Compose are installed on your machine.
- Run the following command to build and start the containers:
docker-compose up --build
This command will:
- Build the Docker images for the Django application and the database.
- Start the containers defined in the
docker-compose.yml
file.
Once the containers are up and running, you can access the application at:
http://localhost:8000
To stop the running containers, press Ctrl+C
in the terminal where docker-compose
is running, then execute:
docker-compose down
This command will stop and remove the containers.
Dockerfile
: Defines the Docker image for the Django application.docker-compose.yml
: Defines the services (Django app and database) and how they interact.emf_hat/
: Contains the Django configuration.hat_api/
: Contains the the hat text controller code and the webpage.
- The Django application uses SQLite by default, but you can configure it to use other databases by modifying the
settings.py
file. - Environment variables can be set in the
docker-compose.yml
file to configure the application.
This project is licensed under the MIT License.