Skip to content

Open source replacement status page inspired by Cachet and others

Notifications You must be signed in to change notification settings

dustinscarberry/signal

Repository files navigation

Signal

Signal is a open source system status dashboard inspired by Cachet and others, built on Symfony and React.

Tech

  • [Symfony 6.4] - PHP MVC Framework
  • [Composer] - PHP Package Manager
  • [Yarn] - JS Package Manager
  • [React] - JS framework for responsive apps

Requirements

Documentation

The docs folder provides detailed guides for the many features of signal.

Development

  1. Clone repository
$ cd /var/www
$ git clone git@github.com:dustinscarberry/signal.git
  1. Install dependencies
$ cd signal
$ composer i --no-scripts
$ yarn install --immutable
  1. Build dependencies
$ yarn dev
  1. Create and configure .env.local at root of project directory
# required properties
APP_ENV=prod
APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DATABASE_URL=mysql://username:password@127.0.0.1:3306/databasename
MAILER_URL=emailConnectionString - https://symfony.com/doc/current/email.html#configuration
  1. Run migrations (from server)
$ php bin/console doctrine:migrations:migrate
  1. Load basic data
$ php bin/console doctrine:fixtures:load

Installation (Standard)

  1. Clone repository
$ cd /var/www
$ git clone git@github.com:dustinscarberry/signal.git
  1. Install dependencies
$ cd signal
$ composer i --no-scripts --no-dev
$ yarn install --immutable
  1. Build dependencies
$ yarn prod
  1. Create and configure .env.local at root of project directory
# required properties
APP_ENV=prod
APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DATABASE_URL=mysql://username:password@127.0.0.1:3306/databasename
MAILER_URL=emailConnectionString - https://symfony.com/doc/current/email.html#configuration
  1. Run migrations (from VM)
$ php bin/console doctrine:migrations:migrate
  1. Load basic data
$ php bin/console doctrine:fixtures:load
  1. Start server (nginx, if needed)

Nginx Basic Config

server {
    listen 443 ssl http2;
    ssl_certificate /etc/nginx/ssl/cert.cer;
    ssl_certificate_key /etc/nginx/ssl/cert.key;
    server_name __;
    root /var/www/signal/public;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
       fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
       fastcgi_param DOCUMENT_ROOT $realpath_root;
       internal;
   }

   location ~ \.php$ {
     return 404;
   }
}

Installation (Docker)

  1. Clone repository
$ cd /var/docker
$ git clone git@github.com:dustinscarberry/signal.git
  1. Create and configure .env.local at root of project directory
# required properties
APP_ENV=prod
APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DATABASE_URL=mysql://username:password@127.0.0.1:3306/databasename
MAILER_URL=emailConnectionString - https://symfony.com/doc/current/email.html#configuration
  1. Create docker-compose.override.yml and modify ports to your environment
$ cd signal
$ cp docker-compose.override.example.yml docker-compose.override.yml
  1. Run docker container
$ docker compose up -d --build
  1. Start server (nginx, if needed)

Nginx Basic Proxy Config

server {
    listen 443 ssl http2;
    ssl_certificate /etc/nginx/ssl/cert.cer;
    ssl_certificate_key /etc/nginx/ssl/cert.key;
    server_name __;

    location / {
        proxy_pass http://127.0.0.1:8001;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
    }
}

Upgrades (Standard)

  1. Get updates from repo
git pull
  1. Run database migrations
php bin/console doctrine:migrations:migrate
  1. Clear cache
rm -rf var/cache/*