Giter Site home page Giter Site logo

theseato / m-moments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kingwrcy/m-moments

0.0 0.0 0.0 635 KB

极简微博-多人朋友圈版本

Home Page: https://m.hotnews.pw

License: MIT License

JavaScript 3.97% PHP 53.05% CSS 3.61% HTML 0.14% Batchfile 0.03% Dockerfile 1.07% Twig 38.14%

m-moments's Introduction

极简微博 - 多人版的极简朋友圈

目前功能比较简单

  1. 支持markdown语法
  2. 支持点赞/评论
  3. 支持注册用户

部署

镜像地址

  1. 新增postgres数据库m-moments,执行schema.sql文件初始化数据库.
  2. 修改根目录下的docker-compose.yml文件里的数据库部分,然后使用docker-compose up -d一键启动.
  3. docker容器里的/app/upload目录则是上传的图片目录,需要映射出来,目前只支持上传头像,发言里的图片暂不支持上传.

本地开发

  1. 克隆本项目到本地.
  2. 提前安装好php和postgres环境,注意php需要安装pgsqlpdo_pgsql扩展.
  3. 执行composer install安装依赖.
  4. 新建.env文件,内容如下:
DB_HOST=postgres
DB_PORT=5432
DB_NAME=m-moments
DB_USER=postgres
DB_PASSWORD=postgres
#图片上传目录
UPLOAD_DIR=/opt/moments/upload
DEFAULT_USER_AVATAR_CDN=https://gravatar.cooluc.com/avatar/
  1. 执行php start.php start启动服务

支持的环境变量

变量名 说明 默认值
DEFAULT_USER_AVATAR_CDN 用户头像的avatar镜像 https://gravatar.cooluc.com/avatar/
STATIC_ASSET_CDN 静态资源cdn前缀 无,读取本地,使用的话需要把项目根目录的public文件夹底下的所有文件上传到CDN

m-moments's People

Contributors

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