Giter VIP home page Giter VIP logo

ibingyu / solo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 88250/solo

0.0 0.0 0.0 100.44 MB

🎸 B3log distributed community blog-end node, welcome to join the next generation community network. B3log 分布式社区的博客端节点,欢迎加入下一代社区网络。

Home Page: https://solo.b3log.org

License: Other

HTML 5.80% Dockerfile 0.02% JavaScript 9.97% Shell 0.03% Java 49.83% FreeMarker 34.31% Smarty 0.04% CSS 0.01%

solo's Introduction

Solo

Small and beautiful blog system, designed for programmers





中文

💡 Introduction

Solo is a small and beautiful open source blog system, designed for programmers. Solo has a very active community, which can push articles as posts to the community, and replies from the community will be linked as blog comments (for details, please visit B3log Ideas - Distributed Community Network).

This is a brand new online community experience, so that you who love recording and sharing no longer feel lonely!

Welcome to Solo Official Discussion Forum to learn more.

🗃 Showcases

https://hacpai.com/top/solo

✨ Features

🎨 Screenshots

Start

start.png

Console

console.png

Post

post.png

Skin

skins.png

Front

pinghsu.png

Bubble.png

nijigen.png

timeline.png

Casper.png

Jane.png

🍱 Skins

The current built-in skins are as follows, you can click to preview:

Welcome to here recommend good-looking skin, we will try to make it.

🛠️ Setup

Solo supports "dynamic and static":

  • Dynamic blog: built on the server, the process runs in resident memory, and is used online
  • Static blog: run on local computer, generate and export static site after writing

Run locally

Local operation is mainly used for trial or static site generation, please refer to here for usage of static site generation.

Download and unzip the latest Solo package, enter the decompression directory and execute:

  • Windows: java -cp "lib/*;." org.b3log.solo.Server
  • Unix-like: java -cp "lib/*:." org.b3log.solo.Server

If you have a Java development environment, you can refer to here to build and run through the source code.

Docker

Docker deployment is a dynamic blog usage, mainly used to deploy dynamic blogs on the server.

Get the latest image

docker pull b3log/solo

Start the container

  • Use MySQL   First create database schema manually (schema name solo, character set use utf8mb4, sorting rule utf8mb4_general_ci), and then start the container:

    docker run --detach --name solo --network=host \
        --env RUNTIME_DB="MYSQL" \
        --env JDBC_USERNAME="root" \
        --env JDBC_PASSWORD="123456" \
        --env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" \
        --env JDBC_URL="jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true" \
        b3log/solo --listen_port=8080 --server_scheme=http --server_host=localhost --server_port=

    For simplicity, the host network mode is used to connect to MySQL on the host.

  • Use H2 Database

    docker run --detach --name solo --volume ~/solo_h2/:/opt/solo/h2/ --publish 8080:8080 \
        --env RUNTIME_DB="H2" \
        --env JDBC_USERNAME="root" \
        --env JDBC_PASSWORD="123456" \
        --env JDBC_DRIVER="org.h2.Driver" \
        --env JDBC_URL="jdbc:h2:/opt/solo/h2/db;MODE=MYSQL" \
        b3log/solo --listen_port=8080 --server_scheme=http --server_host=localhost --server_port=

Start command line arguments description:

  • --listen_port: the process listen port
  • --server_scheme: the protocol for the final visiting, if the anti-generation service is enabled with HTTPS, it also needs to be changed to https
  • --server_host: the domain name or public IP for the final visiting, do not bring port
  • --server_port: the port for the final visiting, use the default 80 or 443 of the browser to leave the value blank

The description of the complete startup arguments can be viewed using -h.

Logging configuration

By default, logs are printed to the standard output stream through log4j2, which can be viewed through docker logs solo. If you need to override the log4j configuration, you can mount the file to achieve:

--volume ~/log4j2.xml:/opt/solo/log4j2.xml

Skin configuration

If you want to use other skins, you can mount the directory skins (it needs to contain all the skins you want to use):

--volume ~/skins/:/opt/solo/skins/

Version upgrade

  1. Pull the latest image
  2. Restart the container

You can refer to here to write a restart script and run it through crontab every morning to achieve automatic update.

Docker Compose

Please refer to here, thanks to @liumapp for providing it.

NGINX reverse proxy

upstream backend {
    server localhost:8080; # Solo listen port
}

server {
    listen       80;
    server_name  88250.b3log.org; # blog domain

    access_log off;

    location / {
        proxy_pass http://backend$request_uri;
        proxy_set_header  Host $http_host;
        proxy_set_header  X-Real-IP $remote_addr;
        client_max_body_size  10m;
    }
}

Be sure to configure:

proxy_set_header  Host $http_host;
proxy_set_header  X-Real-IP $remote_addr;

Otherwise, "Latke configuration error" or abnormal style may appear on the access page; the function of counting online visitors will be abnormal.

📜 Documentation

🏘️ Community

📄 License

Solo uses the Mulan Permissive Software License,Version 2 open source license.

🙏 Acknowledgement

  • jQuery: Front-end JavaScript tool library
  • Vditor: In-browser Markdown editor
  • Highlight.js: Front-end code syntax highlighting library
  • pjax: pushState + AJAX = pjax
  • jsoup: Java HTML parser
  • flexmark: Java Markdown processor
  • Apache Commons: Java commons library
  • Latke: Java Web framework based on JSON

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.