Giter Site home page Giter Site logo

tagfire / tushe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericls/tushe

0.0 2.0 0.0 170 KB

A web based image hosting, viewing and sharing service build on top of Flask.

Home Page: tushe.org

License: MIT License

Python 41.75% Shell 2.78% CSS 12.57% JavaScript 3.01% HTML 39.89%

tushe's Introduction

TUSHE

演示:http://tushe.org

图社(TUSHE)是基于 FLask 的图床和图片浏览网站源码,也可以用作套图网站。网站采用 Mongodb 作为数据库,图片也储存于 GridFS。 采用 Flask—Login 做用户认证,采用 Flask-Admin 做后台。

还用到了 Flask-Mongoengine, Flask-Bcrypt 等。见requirements.txt

特点

  • 注册用户可以认领未注册用户的图片,进行相关信息编辑。
  • 有图册功能,可以作为套图网站。
  • 支持微信公众平台接口,用微信上传图片(需要认证的订阅号或者服务号)。

Docker 自动部署

运行 repo 里面的 docker-run.sh,或者直接运行如下命令

bash -c "$(wget -O - https://raw.githubusercontent.com/ericls/tushe/master/docker-run.sh)"

会提示输入端口号,请输入一个非常用的端口

运行完成之后, 会提示 nginx 的配置,照着配置就可以了。

常规部署

要求

  1. Python3.3+
  2. pip install -r requirements.txt (Pillow 相关的支持见:http://pillow.readthedocs.org/installation.html#linux-installation)

部署方法

提供了uwsgi supervisor 配合 nginx 的配置文件。具体请参考他们的文档。

也可以采用其他方式部署,wsgi 服务器网关接口为tushe.app

已知问题和解决方式

由于引用了 Flask-Login 和 GridFs,所有的请求会插入 Set-Cookie 的 Header。

目前的解决方式是在 Nginx 里面对对应的目录设置 uwsgi_hide_header Set-Cookie。

另外,为了不让每次请求都从数据库读取,可以再引入 Flask-Cache 和在 Nginx 里面设置 uwsgi_cache 相关参数。

tushe's People

Watchers

James Cloos avatar Alex 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.