Giter Club home page Giter Club logo

zhihu's Introduction

zhihu

仿知乎网站

截图

file file

项目结构

-zhihu
    |-config        配置文件
    |-controllers   控制器
    |-middleware    中间件
    |-models        数据库访问
    |-router        路由转发
    |-static        静态资源
    |-utils         实用工具
    |-vendor        项目依赖
    |-views         模板文件
    |-main.go       程序执行入口

安装

软件依赖
Golang
MySQL
Redis

本项目使用govendor管理依赖包

go get -u github.com/kardianos/govendor
go get -u github.com/gitobhub/zhihu
cd $GOPATH/src/github.com/gitobhub/zhihu
govendor sync
go run main.go

Docker

获取镜像

docker pull dockerobhub/zhihuapp
docker pull dockerobhub/zhihudb
docker pull redis

或在docker目录自行构建镜像

启动容器

mysql用户名为docker,默认密码123456

docker network create zhihunet
docker run -d --name mysql --net zhihunet dockerobhub/zhihudb
docker run -d --name redis --net zhihunet redis
docker run -d --name zhihu --net zhihunet -p 8080:8080 -v $GOPATH:/go dockerobhub/zhihuapp

zhihu's People

Contributors

gitobhub 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.