Initial installation

Chris edited this page Sep 9, 2015 · 3 revisions

Initial installation (quick & dirty documented)

First of all, you need to clone this project to your machine. After that, make sure that you have PHP >= 5.4.

Currently, we don't ship any prebuilt versions, so you need to build the app yourself. To do this you must install composer and npm (nodejs package manager, on how to install npm read here)

Composer is needed to install third-party application components, without them application will not run.

After you have finished the installation of npm and composer run:

cd frontend
composer install

At the point, you now have php dependencies installed. It is now time to install tools to build the frontend files. We are using gulp to build our frontend dependencies and bower to manage third-party frontend libraries.

First you need to install gulp cli and bower package manager globally:

sudo npm install -g gulp bower

And then javascript dependencies inside project(installs both build and frontend dependencies)

npm install
bower install

Then you just run the default task

gulp

After these steps, you have all components installed and styles and js built, it is time to configure your database.

Database settings are stored in frontend/app/config/database.php If you'd like to use the default DB settings (MySQL/MariaDB), you'll just need to have the database server running on port 3306 and create a database named "paperwork". You could use the following SQL:

DROP DATABASE IF EXISTS paperwork; CREATE DATABASE IF NOT EXISTS paperwork DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

In addition, you need the "paperwork" user to have full access to this database:

GRANT ALL PRIVILEGES ON paperwork.* TO 'paperwork'@'localhost' IDENTIFIED BY 'paperwork' WITH GRANT OPTION; FLUSH PRIVILEGES;

With these settings, you won't need to modify the database.php configuration file.

After completing these steps, run the migration jobs, that fill the database:

php artisan migrate

If anything here should fail, it's most likely an authentication/connection issue, so check your database setup again.

Now, for the last step, make sure that your webserver has the right to create/modify/delete files within the frontend/app/storage/attachments/, the frontend/app/storage/cache/, the frontend/app/storage/logs/ and the frontend/app/storage/sessions/ folders.

cd to the directory "above" your paperwork installation and run chmod -R u+rwx paperwork to ensure all files are readable, writeable, and executable by the user.

Also, be sure to set the document root (docroot) of your webserver to the folder frontend/public/. If you don't have access to or don't want/know how to do this, you can use .htaccess to set up temporary rewrite rules to experience Paperwork fully. In the example below, it is assumed that you have all your paperwork files in a folder named paperwork folder as child of the document root folder.

  1. Create a new file named .htaccess in the document root
  2. Copy and paste this code in it:
RewriteEngine on
RewriteCond %{REQUEST_URI} !paperwork/frontend/public/
RewriteRule (.*) /paperwork/frontend/public/$1 [L]
  1. Save the file

You can access Paperwork by going to http://localhost or any URL you use to access your machine.

When you need to access any other files from the document root (all folders will be inaccessible), rename the file to something different from .htaccess.

That's pretty much it. From here on, you should be able to access your paperwork instance through the web.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.