Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 1.5 KB

File metadata and controls

87 lines (62 loc) · 1.5 KB

Simple file storage server with image resampling and REST API

Installation

Native Installation

System Requirements

  • Linux server (preferably Debian or Ubuntu)
  • Nginx >= 1.6
  • Python >= 3.4
  • ImageMagick
  • librsvg

Image Optimizers:

  • jpegtran
  • optipng

Nginx Configuration

The host configuration should look like this:

server {
    listen 80;
    server_name domain.name;
    access_log /path/to/domain.name/storage/logs/nginx.access.log;
    error_log /path/to/domain.name/storage/logs/nginx.error.log;

    location ~* ^.+\.(jpg|jpeg|gif|tif|tiff|png|ico|css|zip|tgz|gz|rar|exe|txt|tar|js|xml)$ {
        root /path/to/domain.name/storage/data/client;
        expires 7d;
    }

    location / {
        include uwsgi_params;
        uwsgi_pass unix:///tmp/owl.uwsgi.sock;
        client_max_body_size 100m;
    }
}

Owl Setup Steps

  1. Create environment and storage directory:
    virtualenv domain.name
    cd domain.name
    mkdir storage
  1. Activate the environment:
    source bin/activate
  1. Copy repository contents from src folder to storage

  2. Update correct paths in config/uwsgi.ini and owl/settings.py

  3. Install required packages:

    pip install flask
    pip install uwsgi
    pip install boto3  # for S3-compatible storage support
  1. Navigate to storage directory:
    cd ./storage
  1. Create data directory:
    mkdir data
  1. Start the server:
    ./scripts/server start