Simple rust blog engine
Go to file
2019-04-19 14:59:19 +08:00
migrations feat: add url and analysis setting fields. 2019-01-04 22:51:30 +08:00
src feat: edit article 2019-04-19 14:59:19 +08:00
templates feat: edit article 2019-04-19 14:59:19 +08:00
.gitignore feat: add rocket.toml 2018-09-14 00:18:59 +08:00
Cargo.toml feat: rss 2019-04-19 11:52:36 +08:00
docker-compose.yml fix: remove dependency of docker image 2018-12-06 14:39:17 +08:00
Dockerfile fix: dockerfile 2018-12-12 10:43:06 +08:00
LICENSE Initial commit 2018-09-10 11:01:21 +08:00
Procfile chore: remove secret_key from config file 2018-10-07 14:25:50 +08:00
README.md doc: fix readme 2018-11-20 16:33:56 +08:00
Rocket.toml fixed: set form size limited as 512kb 2018-10-24 22:46:33 +08:00
rust-toolchain feat: add heroku support to build a runnable demo. 2018-10-07 12:38:31 +08:00
RustConfig chore: add diesel flag for diesel cli 2018-10-07 13:31:35 +08:00

Rubble

a lightweight blog engine written by Rust.

PS: And this project is still working in progress, so API of it are very unstable, including the content of the database migrations. I can promise that the elder version of it can be upgraded to the newest one. It means that the best way is installing a new one , instead of upgarding it.

Feature

Cause this project is also the tentative staff I try to write something in Rust, it would not include too many features.

  • Basic Content System without categories
  • Multiple administrators supported
  • Administractor management panel
  • Article management panel
  • Draw supported
  • Customized template
  • RSS supported
  • GraphQL API supported(maybe)

Template

Project rubble highly depends on tera, a fast and effective template engine in Rust, which means that you can write your own template with tera syntax.

There are files in template folder as follow, which are the template for each page:

  • admin folder
    • index.tera index of admin panel
    • login.tera admin login page
  • index.tera index of whole site
  • archives template of single article page

Obviously you can learn how to write this template by the guide of official template folder, and how to use tera syntax in tera's official website.

Deploy using Docker

you can easily use Docker to create your own rubble application. And the latest version of it and each tagged version would be built as docker images storing in Docker Hub automatically. So you can easily pull those images by using docker pull rubble:latest

Rubble uses PostgresQL as data storage, so before strating rubble application, you need to start your postgres service and link it to rubble.

Rubble image can accept some environment variable for setting up:

  • DATABASE_URL url of postgresQL
  • SECRET_KEY secret ke of rubble for creating secret cookies

Docker Stack

But we recommend to deploy rubble with Docker Swarm or Kubenetes. here is a simple file to create a whole rubble application with postgresQLdocker-compose.yml :

version: "3"
services:
  rubble:
    image: kilerd/rubble
    environment:
      DATABASE_URL: postgres://root:password@postgres/rubble
      ROCKET_SECRET_KEY: 7azo1R1AtDzvj2bwv7Qj949xrvBnTzF+EEwvBSDsLWs=
    depends_on:
      - postgres
    networks:
      - backend

  postgres:
    image: postgres:9-alpine
    restart: always
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: password
      POSTGRES_DB: rubble
    networks:
      - backend


networks:
  backend: