Skip to content

Requirements and Install

Stefan Zweifel edited this page Sep 11, 2023 · 6 revisions

Server Requirements

screeenly is a PHP application and therefore needs PHP to run. The following are the basic server requirements you need to run the application:

  • PHP 8.0 or higher
  • MySQL 5.6 or higher (or any other SQL server)
  • Shell Access
  • Access to composer

In order to create Screenshots, you need node, npm, puppeteer and Chrome installed on your server. screeenly.com runs on a Laravel Forge provisioned DigitalOcean Droplet. I've installed all of the mentioned tools by following this Guide:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
sudo npm install --global --unsafe-perm puppeteer
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium

If you would like to update the CSS and Javascript of the application you also need the following tools installed:

  • node 6.0 or newer
  • node, npm / yarn to install Frontend dependencies
  • webpack to build CSS and Javascript assets

Installation

Get the code

You can get the latest version by cloning the repository. Run composer install to install necessary PHP dependencies.

cd /path/to/web/server
git clone https://github.com/stefanzweifel/screeenly.git .
composer install

Initial setup and configuration

All configuration options are stored in an .env file. You can copy the example file and adjust it to your needs.

cp .env.example .env
php artisan key:generate

Migrate your database

screeenly stores its data in a database. After defining the database connection in your .env file you can migrate your database with the following command.

php artisan migrate --force

(Optional) Install Frontend dependencies

screeenly uses Laravel Mix to build its CSS and Javascript assets. In order to build those artefacts you have to install various node-modules with the following commands

yarn install
npm install

Compile assets for local development

When you're working on screeenly locally you don't want to minify your CSS and Javascript (It helps when debugging your code). By running the following code webpack compiles the SASS and Javascript files.

npm run dev

If you don't want to run this command over and over again when you're making changes to your CSS and Javascript, you can also run the following command.

npm run watch

Webpack will then watch for file changes and run the necessary commands on its own.

Compile assets for production

In production, your CSS and Javascript files should be minified. Run the following command to minify and uglify the CSS and Javascript files.

npm run prod