Giter Club home page Giter Club logo

octblog's People

Contributors

flyhigher139 avatar gitter-badger avatar medyagh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octblog's Issues

部署问题

你好,首先非常感谢你的分享。我想把你的代码部署到生产坏境去,采用nginx + gunicorn+centos,请问有详细的部署教程吗?我是Python新手,弄了两天也没有成功。需要你的帮助,万分感谢!

How to make database fit to the new weight feature?

In commit 608df90d56462cdbedc60c3d9211c3ec0cedaaf0, I add weight feature to Post and Draft

And in commit 475032477fff25403e7f877f164d44be9c973f7e, I optimized the list_posts() function to make the new feature compatible to old database.

But you may still want the old database fitting to the new data model.
In order to make them fitting, just run the following snippet in mongodb:

For Posts:

db.getCollection('post').update({}, {$set: {weight: NumberInt(10)}}, {multi: 1})

For Drafts:

db.getCollection('draft').update({}, {$set: {weight: NumberInt(10)}}, {multi: 1})

Why I can't update my config.py?

I have deployed the blog on my service,and I want change the homepage of my blog and I have changed environments variables in config.py,but the homepage of my blog is still the default page,How to change the ? thx.

博客上传图片的问题

感谢兄弟的开源博客,目前我改了下web ui,差不快改完了,三个问题请教一下:
1:老哥blog上线是用的阿云的哪个套餐啊?准备上线部署了,没找到合适的云主机
2:图片上传的url是别外生成的吗?flask-markdown好像没有这个功能,哥们有考虑在博客中实现直接上传图片文件吗?
3:域名绑定后,备案了吗?

先买了vultr一个月的套餐,域名还没有买绑定。
http://45.77.173.62/

关于多用户的疑问

很高兴楼主能开源这个项目,在些表示感谢。我现在想用这个来搭建一个个人博客,不过有一个疑问,就是系统中的多用户是个什么概念?

Docker Errors in Readme

the docker build command is wrong, and the docker-compose file only work on one machine.

ERROR: for mongo  Cannot start service mongo: error while creating mount source path '/Users/gevin/projects/data/mongodb': mkdir /Users/gevin: permission denied

[Errno 111] Connection refused

Hi,
I tried to launch the server from code, and always encounter this error:
ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
raised by mongo-engine, I would like to know if your code will create a database instance ?

Deploy OctBlog by debian8 mod_wsgi

环境

linux:debian 8
python:3.6

配置基础环境

  1. 更新软件源
    sudo apt-get update
  2. 安装apache2
    sudo apt-get install apache2
  3. 安装mod-wsgi
    sudo apt-get install libapache2-mod-wsgi-py3
    到这里基础环境的配置就完毕了

创建wsgi.py

Apache 使用 .wsgi 来启动 Flask 程序。使用以下命令打开 /var/www/projectapp 目录,创建一个 flaskapp.wsgi 文件。

    cd /var/www/projectapp
    sudo nano flaskapp.wsgi
    # 增加如下内容
    #!/usr/bin/python
    import sys
    import logging
    activate_this = '/var/www/OctBlog/venv/bin/activate_this.py'  # 这是虚拟环境路径
    with open(activate_this) as file_:                            # py3的调用
        exec(file_.read(), dict(__file__=activate_this))
    logging.basicConfig(stream=sys.stderr)
    sys.path.insert(0,"/var/www/projectapp/")  #你app的目录
    from OctBlog import app 
    application = app

Apache2配置文件

sudo nano /etc/apache2/sites-available/yoursite.conf

<VirtualHost *:80>
    ServerName www.xxx.com 
    #ServerAlias xxx.com
    #ServerAdmin [email protected] 
    # 存放用户上传图片等文件的位置,注意去掉#号
    # Alias /media/ /var/www/ProjectName/media/ 
    # 静态文件(js/css/images)的存放位置
    Alias /static/ /var/www/OctBlog/app/static/                
    # 允许通过网络获取static的内容
    <Directory /var/www/OctBlog/app/static/>                  
        Require all granted
    </Directory>
    # wsgi文件
    WSGIScriptAlias / /var/www/OctBlog/app/flaskapp.wsgi  
</VirtualHost>

应用配置文件sudo a2ensite projectapp

重启apache2sudo service apache2 restart

!!!遇到问题查看errorlog,/var/log/apache2/error.log

Here is my blog

请问按照教程在服务器上部署了,为啥无法访问呢?

按照教程在docker上部署了
执行 docker -ps 可以看到

CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                                      NAMES
049f3b122a91        gevin/octblog:0.1.2   "/usr/local/bin/super"   3 hours ago         Up About an hour    5000/tcp, 8000/tcp, 0.0.0.0:8005->8005/tcp                 octblogmaster_blog_1
ca27f94bc5cc        mongo:3.2             "docker-entrypoint.sh"   5 hours ago         Up About an hour    27017/tcp                                                  octb

但是在外网8005端口无法访问

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.