# Pet Picture Queue A web application to manage pet pictures from subscribers. Built with Flask, SQLite, and Jinja2 templates. ## Features - Upload pet pictures with subscriber information - View all uploaded pictures in a grid layout - Mark pictures as posted - Modern, responsive UI using Tailwind CSS - Click to view full-size images - Download original images - Add descriptions to pet pictures ## Setup ### Local Development 1. Install dependencies: ```bash uv pip install -e . ``` 2. Run the application: ```bash python main.py ``` The application will be available at `http://localhost:5000` ### Database Migration #### Local Migration If you have an existing database and want to add the description field: ```bash python migrate.py ``` #### Docker Migration To run the migration in Docker: ```bash docker compose --profile migrate up --build migrate ``` This will safely add the description column to your existing database without affecting existing data. ### Docker Deployment #### Using Docker Compose (Recommended) 1. Start the application: ```bash docker compose up --build -d ``` 2. Stop the application: ```bash docker compose down ``` The application will be available at `http://localhost:54321` #### Using Docker Directly 1. Build the Docker image: ```bash docker build -t pet-picture-queue . ``` 2. Run the container: ```bash docker run -d \ -p 54321:5000 \ -v $(pwd)/static/uploads:/app/static/uploads \ -v $(pwd)/pet_pictures.db:/app/pet_pictures.db \ --name pet-picture-queue \ pet-picture-queue ``` The application will be available at `http://localhost:54321` ## Usage 1. Visit the homepage to see all uploaded pet pictures 2. Click "Upload New" to add a new pet picture 3. Fill in the subscriber name and select a picture 4. Add an optional description for the pet picture 5. View uploaded pictures on the homepage 6. Click on any picture to view it in full size 7. Use the "Download Original" button to download the original file 8. Mark pictures as posted using the "Mark as Posted" button ## File Structure - `main.py` - Main Flask application - `migrate.py` - Database migration script - `templates/` - Jinja2 templates - `base.html` - Base template with common layout - `index.html` - Homepage with picture grid - `upload.html` - Upload form - `static/uploads/` - Directory for uploaded pictures - `pet_pictures.db` - SQLite database (created automatically) - `Dockerfile` - Docker configuration - `.dockerignore` - Docker build exclusions - `docker-compose.yml` - Docker Compose configuration