Skip to main content
Version: 5.3.7

Source code

The following is a tutorial on local deployment development for different operating systems.

Prepare dependencies​

macOS​

Install homebrew​

First you need to install Xcode Command tools:

$ xcode-select --install

Then install Homebrew, the package management tool for macOS

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install dependencies​

$ brew install postgresql webp imagemagick node git

Setup Database and cache services​

Run postgresql services

$ brew services start postgresql

You also need to create a default username in Postgresql:

$ createuser --superuser zealot

# If you are worried about the high privilege, you can only enable the create database privilege
$ createuser --createdb zealot

yarn​

$ npm install -g yarn

Debian (Ubuntu)​

System dependencies​

$ apt update
$ apt install -y libssl-dev tar tzdata git imagemagick libjpeg-dev libpng-dev libtiff-dev libwebp-dev

Install dependencies​

$ apt install -y postgresql-client node

Setup Database and cache services​

Run postgres services

$ systemctl postgres start

You also need to create a default username in Postgresql:

$ initdb -D /var/lib/postgresql/data
$ createuser --superuser zealot

# If you are worried about the high privilege, you can only enable the create database privilege
$ createuser --createdb zealot

node​

$ npm install -g yarn

Alpine Linux​

System dependencies​

$ apk --update --no-cache add build-base libxml2 libxslt git \
libxml2-dev libxslt-dev yaml-dev postgresql-dev nodejs npm yarn libwebp-dev libpng-dev tiff-dev \
tzdata

Needs install gcompat if use arm architecture. or an exception will throws such like "Error loading shared library".

Install dependencies​

$ apk --update --no-cache postgresql

Setup Database and cache services​

Run postgres services

$ rc-service postgres start

You also need to create a default username in Postgres:

$ initdb -D /var/lib/postgresql/data
$ createuser --superuser zealot

# If you are worried about the high privilege, you can only enable the create database privilege
$ createuser --createdb zealot

Install Ruby​

Can be installed by either asdf, rvm as ruby version manager.

Following the offical install guide then:

# Enable Ruby 3.3.0 YJIT need install rust 1.58+
# Optinal install:
asdf plugin add rust
asdf install rust latest
asdf global rust latest
export RUBY_CONFIGURE_OPTS=--enable-yjit

# Required:
asdf plugin add ruby
asdf install ruby 3.3.0
asdf global ruby 3.3.0

Fetch source code​

git clone https://github.com/tryzealot/zealot.git

Initialize Zealot​

All the following steps need to be performed in the zealot root directory.

bundler​

Install Ruby gems

$ [sudo] gem install bundler
$ bundle install

yarn​

Install javascript packages:

$ yarn install

Initialize database​

Make sure there are no problems with the connection database information, then the database tables will be created and the table structure will be created:

$ rails db:create
$ rails db:migrate

Configuring the connection database can be done via environment variables or by changing the config/database.yml file.

Initialize default account and demo data​

Initialize administrator account and sample application

$ rails db:seed

Launch services​

$ bin/dev

Open brower http://localhost:3000