Code Monkey home page Code Monkey logo

simplesns's Introduction

simpleSNS

CircleCI Build Status StyleCI continuousphp continuousphp continuousphp CocoaPods License

说明

simpleSNS 是一个 SNS 社交网站,你可以通过你的Github帐户登录,在这个社交网站上你可以和不同兴趣的好友分享有趣的东西。

环境要求

  • PHP >= 7.1
  • MySQL >= 5.7
  • Node >=8.0
  • Redis
  • Supervisor

开始安装

Docker 镜像方式安装

docker-compose build
docker-compose up -d

普通安装

git clone https://github.com/wqer1019/simpleSNS.git

Composer

cd simpleSNS
composer install

安装前端依赖

npm install

编译前端资源

npm run production

相关配置

通用

cp .env.example .env

Pusher 通知 Pusher

BROADCAST_DRIVER=pusher
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=ap1

短信通知 阿里大鱼

# 阿里短信接口
ALI_ACCESS_KEY_ID=
ALI_ACCESS_KEY_SECRET=

GitHub github oauth2

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT=http://sns.local/oauth/github/callback

JSON Web Token

JWT_SECRET=
JWT_TTL=3600
JWT_REFRESH_TTL=21600
JWT_BLACKLIST_GRACE_PERIOD=30

队列服务

添加队列任务

ln -s /home/vagrant/code/simpleSNS/laravel-worker.conf /etc/supervisor/conf.d/laravel-worker.conf

启动队列任务

$ sudo supervisorctl reread
$ sudo supervisorctl update
$ sudo supervisorctl start laravel-worker:*

重启队列

sudo supervisorctl restart all

任何与队列代码相关的修改都需要重启队列服务!

开始使用

生成密钥

php artisan key:generate
php artisan jwt:secret

创建数据库并填充测试数据

php artisan migrate --seed

创建软链接

php artisan storage:link

日志

系统日志:

/home/vagrant/code/simpleSNS/storage/logs/laravel*.log

队列日志:

/home/vagrant/code/simpleSNS/storage/logs/worker.log

License

The project is open-sourced software licensed under the MIT license.

simplesns's People

Contributors

sunl888 avatar zyq666 avatar

Stargazers

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