Blog platform
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 
stephen 5d7d475af1 Merge pull request 'Order posts in category correctly' (#47) from category-order into master 3 månader sedan
app Order posts in category correctly 3 månader sedan
bin First commit 1 år sedan
config Added categories 6 månader sedan
db Category unit tests 6 månader sedan
lib Fixed carrierwave task 10 månader sedan
log First commit 1 år sedan
public RSS feeds 9 månader sedan
storage First commit 1 år sedan
test Category unit tests 6 månader sedan
tmp First commit 1 år sedan
util Docker complete! 10 månader sedan
.browserslistrc First commit 1 år sedan
.gitignore Replaced table with flex grid 3 månader sedan
.ruby-version First commit 1 år sedan
Dockerfile Docker complete! 10 månader sedan
Gemfile Registration captcha 8 månader sedan
Gemfile.lock Registration captcha 8 månader sedan
README.md Added categories 6 månader sedan
Rakefile First commit 1 år sedan
babel.config.js First commit 1 år sedan
config.ru First commit 1 år sedan
docker-compose.yml Docker complete! 10 månader sedan
dockerstart.sh Docker complete! 10 månader sedan
package.json First commit 1 år sedan
postcss.config.js First commit 1 år sedan
webapp.conf Updated readme 9 månader sedan
yarn.lock First commit 1 år sedan

README.md

Pressr

Pressr is a multi-user, multi-blog website written in Ruby on Rails. Although it uses Javascript by default, it is still fully functional even when it is turned off.

Sample instance

My blog(Uses Pressr)

Features

  • Comments and comment replies

  • Multi-user support

  • Multi-blog support

  • Multi-page support

  • Automatic pagination

  • Image upload

  • Markdown support

  • Very lightweight

  • StatsD integration

  • Custom per-blog theming

  • RSS feeds

  • Draft posts/pages

  • Categories

Configuration

Database settings are configured in config/database.yml. It defaults to Postgres running on localhost.

Custom settings are configured in config/pressr.yml.

Deployment (Docker)

A sample docker-compose.yml is provided. Make sure to change the SECRET_KEY_BASE ! This is very important!

  1. Run docker-compose once

docker-compose up

  1. Terminate the process and create an admin account

docker-compose run web bash -c 'util/createAdmin.sh'

  1. Start docker compose again

docker-compose up

You will be able to access Pressr at http://localhost:3000

Deployment (Debian 10)

  1. Ensure system is up to date

sudo apt update && sudo apt upgrade

  1. Install dependencies

sudo apt install build-essential dirmngr gnupg ruby ruby-dev zlib1g-dev libruby libssl-dev libpcre3-dev libcurl4-openssl-dev rake ruby-rack dirmngr postgresql-11 nginx apt-transport-https ca-certificates curl git libpq-dev

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt update && sudo apt install yarn

  1. Create a new user

sudo adduser deploy

sudo usermod -aG sudo deploy

sudo su deploy

cd ~

  1. Install Ruby via RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

curl -sSL https://get.rvm.io | bash -s stable --ruby

source ~/.rvm/scripts/rvm

rvm install ruby-2.6.4

rvm --default use ruby-2.6.4

gem install bundler -v 2

  1. Configure Postgres

sudo su postgres

createuser deploy

psql

ALTER USER deploy CREATEDB;

exit

exit

  1. Install Pressr

git clone https://git.scd31.com/stephen/Pressr

cd Pressr

export RAILS_ENV=production

export EDITOR=nano

bundle install

rm config/credentials.yml.enc

rails credentials:edit

Edit config/database.yml and comment out username and password under the header production

rake db:create

rake db:migrate

rake assets:precompile

  1. Install Phusion

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7

sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger buster main > /etc/apt/sources.list.d/passenger.list'

sudo apt-get update

sudo apt-get install libnginx-mod-http-passenger

  1. Configure nginx

Open /etc/nginx/conf.d/mod-http-passenger.conf. Verify these lines are present:

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;

passenger_ruby /usr/bin/passenger_free_ruby;

Open /etc/nginx/sites-available/default in a text editor. Remove everything except for:

server {
	listen 80 default_server;
	listen [::]:80 default_server;
	passenger_enabled on;
	passenger_user deploy;
	passenger_min_instances 1;
	client_max_body_size 100M;
	root /home/deploy/Pressr/public;
}

passenger_pre_start http://localhost:3000/;

Restart Nginx

sudo service nginx start

Browse to http://<your server ip> and you should see the web interface!