A cloud-based Django application for processing images with various filters and storing them in AWS S3.
- 6 Image Filters: Grayscale, Sepia, Poster, Blur, Edge Detection, Solar
- Drag & Drop Upload: Easy image upload interface
- AWS S3 Integration: Automatic cloud storage
- Responsive Design: Works on desktop and mobile
- Docker Support: Easy deployment with Docker
- Gallery View: Browse all processed images
git clone https://github.com/pneman1/CloudImage.git
cd CloudImage
chmod +x setup.sh
./setup.sh
source venv/bin/activate
python manage.py runserver-
Clone the repository
git clone https://github.com/pneman1/CloudImage.git cd CloudImage -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run migrations
python manage.py migrate
-
Start development server
python manage.py runserver
-
Access the application
- Main app: http://localhost:8000
- Upload images: http://localhost:8000/images/upload/
- Gallery: http://localhost:8000/images/gallery/
-
Build and run with Docker Compose
docker-compose up -d
-
Access the application
- Main app: http://localhost:8000
- Nginx proxy: http://localhost:80
Create a .env file with the following variables:
# Django Settings
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Database (for production)
DATABASE_URL=postgresql://user:password@localhost:5432/image_processing
# AWS S3 Configuration
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_STORAGE_BUCKET_NAME=your-s3-bucket-name
AWS_S3_REGION_NAME=us-east-1-
Create S3 bucket
./setup-s3.sh
-
Or configure manually
aws configure
-
Test S3 integration
- Upload an image through the web interface
- Check your S3 bucket for the processed image
ImageProcessing/
βββ apps/ # Django applications
β βββ core/ # Core functionality
β βββ images/ # Image processing
β βββ storage/ # S3 storage utilities
β βββ common/ # Shared utilities
βββ config/ # Django configuration
βββ templates/ # HTML templates
βββ static/ # Static files (CSS, JS)
βββ media/ # Media files
βββ deployment/ # Deployment configurations
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose setup
βββ manage.py # Django management script
The application supports 6 different image filters:
- Grayscale - Convert to black and white
- Sepia - Vintage brown tone effect
- Poster - Reduce colors for poster effect
- Blur - Gaussian blur effect
- Edge Detection - Highlight edges
- Solar - Invert colors for solar effect
# Build and start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down-
Configure environment variables
cp production.env.example .env # Edit .env with your production values -
Deploy with production configuration
docker-compose -f docker-compose.prod.yml up -d
-
Set up SSL (optional)
- Configure Nginx with SSL certificates
- Update security settings in Django
python manage.py test# Create migrations
python manage.py makemigrations
# Apply migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser# Collect static files
python manage.py collectstatic- Django logs: Check console output
- Docker logs:
docker-compose logs -f - Nginx logs:
docker-compose logs nginx
- Image processing: Optimized with NumPy
- S3 uploads: Asynchronous processing
- Caching: Redis for session storage
-
"ModuleNotFoundError"
- Ensure virtual environment is activated
- Install dependencies:
pip install -r requirements.txt
-
"Database connection failed"
- Check database configuration
- Run migrations:
python manage.py migrate
-
"S3 upload failed"
- Verify AWS credentials
- Check S3 bucket permissions
- Ensure bucket exists
-
"Static files not found"
- Run:
python manage.py collectstatic - Check STATIC_ROOT setting
- Run:
Enable debug mode for development:
# In config/settings.py
DEBUG = TrueGET /- Home pageGET /images/upload/- Upload formPOST /images/upload/- Process imageGET /images/result/<id>/- View processed imageGET /images/gallery/- Browse all imagesGET /images/download/<id>/- Download image
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Django framework
- Pillow for image processing
- Bootstrap for UI components
- AWS S3 for cloud storage
- Docker for containerization
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the deployment guide
Built with β€οΈ using Django, AWS S3, and Docker