2.2 KiB
Setup the project on your server
If you don't want to use Docker, the best way to setup the project is to use the same configuration that Homestead uses. Basically, Monica depends on the following:
- PHP 7.0+
- MySQL, SQLite or Postgre
- Git
- Composer
- Optional: Redis or Beanstalk
The preferred OS distribution is Ubuntu 16.04, simply because all the development is made on it and we know it works. However, any OS that lets you install the above packages should work.
Once the softwares above are installed, clone the repository and proceed as follow:
composer installin the folder the repository has been cloned.cp .env.example .envto configure Monica.- Update
.envwith your specific needs. - Run
php artisan key:generateto generate an application key. This will setAPP_KEYwith the right value automatically. - Create a database called
monica. php artisan migrateto run all migrations.php artisan storage:linkto enable avatar uploads for the contacts.php artisan db:seed --class ActivityTypesTableSeederto populate the activity types.php artisan db:seed --class CountriesSeederTableto populate the countries table.- In order for the reminders to be sent (reminders are created inside the
application and associated to contacts), you need to setup a cron that runs
every minute with the following command
php artisan schedule:run.
Optional: Setup the queues with Redis, Beanstalk or Amazon SQS
Monica can work with a queue mechanism to handle different events, so we don't block the main thread while processing stuff that can be run asynchronously, like sending emails. By default, Monica does not use a queue mechanism but can be setup to do so.
There are three choices for the queue mechanism:
- Database (this will use the database used by the application to act as a queue)
- Redis
- Beanstalk
- Amazon SQS
The simplest queue is the database driver. To set it up, simply change in your
.env file the following QUEUE_DRIVER=sync by QUEUE_DRIVER=database.
To configure the other queues, refer to the official Laravel documentation on the topic.