Giter VIP home page Giter VIP logo

webcan's Introduction

Webcan

Getting Started

Requirements

  • pyenv with python 3.6.2 installed
  • A mongodb server

Installing

git clone https://github.com/JonnoFTW/webcan
cd webcan
pyenv local 3.6.2
python setup.py develop

Running

After you've setup the application, you'll need to create the collections and databases required:

Now you can run the application with the following:

export LDAP_SERVER='url.to.ldap'
export LDAP_USERNAME_SUFFIX='suffix.for.ldap.username'
export WEBCAN_MONGO_URI='mongodb://username:[email protected]:27017/webcan'
pserve production.ini http_port=80

It's highly recommend to use an nginx in front of this server with gzip turned on, include the following in your nginx configuration:

upstream webcan {
       server localhost:5000;
}
server {
    listen 6867;
    listen 6868 ssl http2;
    
    ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
    ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    gzip  on;

    gzip_disable "msie6";

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/zip;

    location / {
        proxy_set_header        Host $http_host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        client_max_body_size    10m;
        client_body_buffer_size 128k;
        proxy_connect_timeout   60s;
        proxy_send_timeout      90s;
        proxy_read_timeout      90s;
        proxy_buffering         off;
        proxy_temp_file_write_size 64k;
        proxy_pass http://webcan;
                
    }
    location /static {
        root                    /path/to/webcan/webcan/;
        expires                 30d;
        add_header              Cache-Control public;
        access_log              off;
    }
    location = /favicon.ico {
        alias /path/to/webcan/webcan/static/favicon.ico;
    }
}

webcan's People

Contributors

jonnoftw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.