mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Moving self host docs to readthedocs
This commit is contained in:
parent
f491e334db
commit
b7b583549c
79
docs/configure.rst
Normal file
79
docs/configure.rst
Normal file
@ -0,0 +1,79 @@
|
||||
Configure
|
||||
=========
|
||||
|
||||
Review the .env.example file to see additional settings.
|
||||
|
||||
Recurring invoices and reminder emails
|
||||
""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Create a cron to call the ninja:send-invoices and ninja:send-reminders Artisan commands once daily.
|
||||
|
||||
``0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-invoices``
|
||||
|
||||
``0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-reminders``
|
||||
|
||||
Postmark bounce and open notifications
|
||||
""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Include the following two setting in the .env file, the rest of the email settings can be commented out.
|
||||
|
||||
``POSTMARK_API_TOKEN=``
|
||||
|
||||
``MAIL_FROM_ADDRESS=``
|
||||
|
||||
In your Postmark account settings make sure ‘Open tracking’ is enabled and enter the following values under Settings > Outbound.
|
||||
|
||||
- Bounce webhook: https://invoices.example.com/hook/email_bounced
|
||||
- Open webhook: https://invoices.example.com/hook/email_opened
|
||||
|
||||
Social/One-Click Login
|
||||
""""""""""""""""""""""
|
||||
|
||||
Create an application in either Google, Facebook, GitHub or LinkedIn and then set the client id, secret and redirect URL in the .env file. For example:
|
||||
|
||||
``GOOGLE_CLIENT_ID=``
|
||||
|
||||
``GOOGLE_CLIENT_SECRET=``
|
||||
|
||||
``GOOGLE_OAUTH_REDIRECT=http://ninja.dev/auth/google``
|
||||
|
||||
PhantomJS
|
||||
"""""""""
|
||||
|
||||
We use phantomjscloud.com to attach PDFs to emails sent by background processes. Check for the following line in the .env file to enable this feature or sign up to increase your daily limit.
|
||||
|
||||
``PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address'``
|
||||
|
||||
You can install PhantomJS to generate the file locally, to enable it add ``PHANTOMJS_BIN_PATH=/usr/local/bin/phantomjs``. To determine the path you can run ``which phantomjs`` from the command line.
|
||||
|
||||
Custom Fonts
|
||||
""""""""""""
|
||||
|
||||
Follow these steps to add custom ttf fonts: ie, Google fonts
|
||||
|
||||
- Create a new folder in ``public/fonts/invoice-fonts/`` and copy over the ttf files
|
||||
- Run ``grunt dump_dir``
|
||||
- Add the font to ``database/seeds/FontsSeeder.php``
|
||||
- Run ``php artisan db:seed --class=FontsSeeder``
|
||||
- Clear the cache by adding ``?clear_cache=true`` to the end of the URL
|
||||
|
||||
Google Map
|
||||
""""""""""
|
||||
|
||||
You need to create a Google Maps API key for the Javascript, Geocoding and Embed APIs and then add ``GOOGLE_MAPS_API_KEY=your_key`` to the .env file.
|
||||
|
||||
Using a Proxy
|
||||
"""""""""""""
|
||||
|
||||
If you need to set a list of trusted proxies you can add a TRUSTED_PROXIES value in the .env file. ie,
|
||||
|
||||
``TRUSTED_PROXIES='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'``
|
||||
|
||||
Customizations
|
||||
""""""""""""""
|
||||
|
||||
Our `developer guide <https://www.invoiceninja.com/knowledgebase/developer-guide/>`_ has more details about our application’s codebase.
|
||||
|
||||
You can add currencies and date/time formats by adding records to their respective tables in the database. This data is cached, to clear it load any page with ``?clear_cache=true`` added to the end of the URL.
|
||||
|
||||
The JavaScript and CSS files are compiled to built files, you can recompile them by running bower install and then ``gulp``.
|
@ -43,5 +43,8 @@ Want to find out everything there is to know about how to use your Invoice Ninja
|
||||
:maxdepth: 1
|
||||
:caption: Self Host
|
||||
|
||||
install
|
||||
configure
|
||||
update
|
||||
iphone_app
|
||||
custom_modules
|
||||
|
76
docs/install.rst
Normal file
76
docs/install.rst
Normal file
@ -0,0 +1,76 @@
|
||||
Install
|
||||
=======
|
||||
|
||||
Thanks for taking the time to setup Invoice Ninja.
|
||||
|
||||
All Pro and Enterprise features from our hosted app are included in both the zip file and the GitHub repository.
|
||||
|
||||
.. Note:: The applications requires PHP >= 5.5.9 and MySQL.
|
||||
|
||||
Detailed Guides
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
- Ubuntu and Apache: `technerdservices.com <http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/>`_
|
||||
|
||||
- Debian and Nginx: `rosehosting.com <https://www.rosehosting.com/blog/install-invoice-ninja-on-a-debian-7-vps/>`_
|
||||
|
||||
Automated Installers
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Dockerfile (Free): `github.com/invoiceninja/dockerfiles <https://github.com/invoiceninja/dockerfiles>`_
|
||||
|
||||
- Softaculous ($30): `softaculous.com <https://www.softaculous.com/apps/ecommerce/Invoice_Ninja>`_
|
||||
|
||||
Step 1: Download the code
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
You can either download the zip file below or checkout the code from our GitHub repository. The zip includes all third party libraries whereas using GitHub requires you to use Composer to install the dependencies.
|
||||
|
||||
https://download.invoiceninja.com/ninja-v3.0.2.zip
|
||||
|
||||
- Release Notes: `github.com/invoiceninja/invoiceninja/releases <https://github.com/invoiceninja/invoiceninja/releases>`_
|
||||
|
||||
- Roadmap: `trello.com/b/63BbiVVe/invoice-ninja <https://trello.com/b/63BbiVVe/invoice-ninja>`_
|
||||
|
||||
Step 2: Upload the code to your server
|
||||
""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Copy the ZIP file to your server and then check that the storage folder has 755 permissions and is owned by the webserver user.
|
||||
|
||||
``cd /path/to/ninja/code``
|
||||
|
||||
``chmod -R 755 storage``
|
||||
|
||||
``sudo chown -R www-data:www-data storage bootstrap public/logo``
|
||||
|
||||
Step 3: Setup the database
|
||||
""""""""""""""""""""""""""
|
||||
|
||||
You’ll need to create a new database along with a user to access it. Most hosting companies provide an interface to handle this or you can run the SQL statements below.
|
||||
|
||||
``CREATE DATABASE ninja;``
|
||||
|
||||
``CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';``
|
||||
|
||||
``GRANT ALL PRIVILEGES ON * . * TO 'ninja'@'localhost';``
|
||||
|
||||
Step 4: Configure the web server
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
Please see these guides for detailed information on configuring Apache or Nginx.
|
||||
|
||||
Once you can access the site the initial setup screen will enable you to configure the database and email settings as well as create the initial admin user.
|
||||
|
||||
.. Tip:: The best practice to remove public/ from the URL is to map the webroot to the folder, alternatively you can uncomment ``RewriteRule ^(.*)$ public/$1 [L]`` in the .htaccess file.
|
||||
|
||||
Troubleshooting
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
- Check your webserver log (ie, ``/var/log/apache2/error.log``) and the application logs (``storage/logs/laravel-error.log``) for more details or set ``APP_DEBUG=true`` in .env
|
||||
- To resolve ``[Symfony\Component\Debug\Exception\FatalErrorException] Class 'SomeClass' not found`` try running php artisan optimize
|
||||
- To resolve ``file_put_contents(...): failed to open stream: Permission denied`` run ``chmod -R 777 storage`` then ``chmod -R 755 storage``
|
||||
- If ``index.php`` is in the URL it likely means that mod_rewrite needs to be enabled.
|
||||
- Running ``composer install`` and ``composer dump-autoload`` can sometimes help with composer problems.
|
||||
- If you’re using a subdomain. ie, ``invoice.mycompany.com`` You will need to add ``RewriteBase /`` to ``public/.htaccess`` otherwise it may fail with ``Request exceeded the limit of 10 internal redirects due to probable configuration error.`` messages in the logs.
|
||||
- Composer install error: ``Fatal error: Allowed memory size of...`` Try the following: ``php -d memory_limit=-1 /usr/local/bin/composer install``
|
||||
- PHP Fatal error: ``Call to undefined method Illuminate\Support\Facades\Session::get()`` try deleting ``bootstrap/cache/services.php``
|
38
docs/update.rst
Normal file
38
docs/update.rst
Normal file
@ -0,0 +1,38 @@
|
||||
Update
|
||||
======
|
||||
|
||||
.. Note:: We recommend backing up your database before updating the app.
|
||||
|
||||
To update the app you just need to copy over the latest code. The app tracks the current version in a file called ``version.txt``, if it notices a change it loads ``/update`` to run the database migrations.
|
||||
|
||||
If the auto-update fails you can manually run the update with the following commands. Once completed add ``?clear_cache=true`` to the end of the URL to clear the application cache.
|
||||
|
||||
``composer dump-autoload --optimize``
|
||||
|
||||
``php artisan optimize --force``
|
||||
|
||||
``php artisan migrate``
|
||||
|
||||
``php artisan db:seed --class=UpdateSeeder``
|
||||
|
||||
We’ve seen some updates fail when moving the app to a new server because the MySQL default storage engine has changed with MySQL 5.7. If you see ``SQLSTATE[HY000]: General error: 1215`` error you may be able to fix it by running this `SQL query <https://www.invoiceninja.com/forums/topic/problem-with-new-install/#post-5313>`_
|
||||
.
|
||||
|
||||
|
||||
Version 2.6
|
||||
"""""""""""
|
||||
|
||||
Make sure the ``.env`` file includes ``APP_CIPHER=rijndael-128``
|
||||
|
||||
Version 2.5.1
|
||||
"""""""""""""
|
||||
Minimum PHP version is now 5.5.9
|
||||
|
||||
Version 2.0
|
||||
"""""""""""
|
||||
|
||||
Copy ``.env.example`` to ``.env`` and set config settings
|
||||
|
||||
Set the app cipher to ``rijndael-256`` to support existing passwords
|
||||
|
||||
Check that ``/path/to/ninja/storage`` has 755 permissions and is owned by the webserver user
|
Loading…
Reference in New Issue
Block a user