This guide show you how you can install Staytus, which is a modern, intuitive and even open-source status page for your product.
Let's get started with installing all the required packets in order to run Staytus:
apt-get install mysql-server ruby ruby-dev nodejs git build-essential libmysqlclient-dev sudo gem install bundler procodile
Make sure to pick a secure password for your MySQL
root user and note it, as you will need it in the next step.
All the data Staytus stores and delivers is stored in a MySQL database, which we will create now, including an authorized user:
mysql -u root -p FLUSH PRIVILEGES; CREATE DATABASE staytus CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER `staytus`@`127.0.0.1` IDENTIFIED BY 'choose-a-secure-password'; GRANT ALL ON `staytus`.* TO `staytus`@`127.0.0.1`;
We will now create an user which will later run Staytus for us:
useradd -r -d /opt/staytus/ -m -s /bin/bash staytus
This command will add an user with
/opt/staytus/ as home directory, where we will store Staytus itself.
We will now download Staytus by cloning the git repository:
git clone https://github.com/adamcooke/staytus /opt/staytus/staytus/
We can now switch into the
/opt/staytus/staytus directory and perform all further required actions:
cd /opt/staytus/staytus bundle install --deployment --without development:test cp config/database.example.yml config/database.yml
You now have to open the file
config/database.yml and adjust the
password parameters to match you settings earlier. In our case this is
choose-a-secure-password in the same respective order.
Now we will compile the assets and install the application itself:
bundle exec rake staytus:build bundle exec rake staytus:install
We can now fork the application into the background using the following command using the user we created earlier:
sudo -u staytus procodile start
You can now access the webinterface under
http://[YOUR_SERVER_IP]:8787/. Please mark that you cannot change this port, so if you would like to use SSL or Port 80, you need a reverse proxy, such as Nginx.
We do now have a basic setup of Staytus which is a quite new and awesome status page solution. Happy hacking!