From 331356a210c1d090a214cf495da2616619ce2205 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Fri, 16 Feb 2018 11:22:29 +0100 Subject: [PATCH 1/3] Update documentation --- Makefile | 4 +- docs/contribute/contribute.md | 5 +- docs/installation/debian.md | 175 ++++++++-------------------------- docs/installation/docker.md | 16 ++-- docs/installation/generic.md | 64 +++++++++++-- docs/installation/update.md | 14 ++- 6 files changed, 120 insertions(+), 158 deletions(-) diff --git a/Makefile b/Makefile index 3be3bc14aa4..9ee2e85e94f 100644 --- a/Makefile +++ b/Makefile @@ -46,12 +46,12 @@ docker_push_bintray: build: build-dev build-prod: - composer install --no-interaction --prefer-dist --no-suggest --no-dev + composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --no-dev npm install npm run production build-dev: - composer install --no-interaction --prefer-dist --no-suggest + composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader npm install npm run dev diff --git a/docs/contribute/contribute.md b/docs/contribute/contribute.md index c41dd53c3e5..f064e7701a9 100644 --- a/docs/contribute/contribute.md +++ b/docs/contribute/contribute.md @@ -71,6 +71,7 @@ We've installed the development version with [Valet](https://laravel.com/docs/va * [Node](https://nodejs.org/en/) * PHP 7.0+ * [Composer](https://getcomposer.org/) +* GNU Make **Steps to install Monica** @@ -81,7 +82,7 @@ Once the above softwares are installed (or if you've finished the installation o 1. If you use Homestead (which uses Vagrant under the hood), `vagrant ssh` will let you login as root inside your VM. 1. Run `make install` in the folder the repository has been cloned. This will run : 1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. - 1. `composer install` to install all packages. + 1. `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader` to install all packages. 1. `npm install` to install all the front-end dependencies and tools needed to compile assets. 1. `npm run dev` to compile js and css assets. 1. `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. @@ -97,7 +98,7 @@ If you haven't skipped the seeding of fake data, two accounts are created by def * Second account is `blank@blank.com` with the password `blank`. This account does not contain any data and shall be used to check all the blank states. To update a current installation with the latest dependencies, just run `make update` to run - 1. `composer install` + 1. `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader` 1. `npm install` 1. `npm run dev` 1. `php artisan migrate` diff --git a/docs/installation/debian.md b/docs/installation/debian.md index f8c102f06f0..52e80a05e95 100644 --- a/docs/installation/debian.md +++ b/docs/installation/debian.md @@ -9,22 +9,29 @@ sudo apt install apache2 mariadb-server php7.0 php7.0-mysql php7.0-xml \ #### 2. Clone the repository -``` +You may install Monica by simply closing the repository. Consider cloning the repository into any folder, example here in `/var/www/monica` directory: +```sh sudo git clone https://github.com/monicahq/monica.git /var/www/monica ``` +You should check out a tagged version of Monica since `master` branch may not always be stable. +Find the latest official version on the [release page](https://github.com/monicahq/monica/releases) +```sh +cd /var/www/monica +// Clone the desired version +sudo git checkout tags/v1.6.2 +``` + #### 3. Change permissions on the new folder -``` +```sh sudo chown -R www-data:www-data /var/www/monica ``` #### 4. Install nodejs (this is needed for npm) -``` +```sh curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - -``` -``` sudo apt-get install -y nodejs ``` @@ -33,183 +40,77 @@ sudo apt-get install -y nodejs Download and install the binary by following the [Command-line installation of composer](https://getcomposer.org/download/). Move it to the bin directory. -``` +```sh sudo mv composer.phar /usr/local/bin/composer ``` #### 6. Setup the database -First we're making the database a bit more secure. -``` +First make the database a bit more secure. +```sh sudo mysql_secure_installation ``` Next log in with the root account to configure the database. -``` +```sh sudo mysql -uroot -p ``` -This command creates a database called monicadb -``` -create database monicadb; +Create a database called 'monica' +```sql +CREATE DATABASE monica; ``` -while this commands creates a database user called monica and its -password 'strongpassword'. +Create a user called 'monica' and its password 'strongpassword'. -``` +```sql CREATE USER 'monica'@'localhost' IDENTIFIED BY 'strongpassword'; ``` -We have to authorize the new user on the monicadb so that he is allowed to -change the database. - -``` -GRANT ALL ON monicadb.* TO 'monica'@'localhost'; +We have to authorize the new user on the `monica` db so that he is allowed to change the database. +```sql +GRANT ALL ON monica.* TO 'monica'@'localhost'; ``` And finally we apply the changes and exit the database. -``` +```sql FLUSH PRIVILEGES; exit ``` #### 7. Configure Monica -Run `composer install` in the folder the repository has been cloned to. Which in our case would be /var/www/monica. - -Create a copy of the example configuration file `cp .env.example .env`. - -Now update `.env` with your specific needs. If you would run the setup with the exact commands used above your file should look like this: - -``` -# Two choices: local|production. Use local if you want to install Monica as a -# development version. Use production otherwise. -APP_ENV=local - -# true if you want to show debug information on errors. For production, put this -# to false. -APP_DEBUG=false - -# The encryption key. This is the most important part of the application. Keep -# this secure otherwise, everyone will be able to access your application. -# Must be 32 characters long exactly. -# Use `php artisan key:generate` to generate a random key. -APP_KEY=ChangeMeBy32KeyLengthOrGenerated - -# The URL of your application. -APP_URL=http://localhost - -# Database information -# To keep this information secure, we urge you to change the default password -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=monica -DB_USERNAME=homestead -DB_PASSWORD=secret -DB_TEST_DATABASE=monica_test -DB_TEST_USERNAME=homestead -DB_TEST_PASSWORD=secret - -# Mail credentials used to send emails from the application. -MAIL_DRIVER=smtp -MAIL_HOST=mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=ValidEmailAddress -MAIL_FROM_NAME="Some Name" -APP_EMAIL_NEW_USERS_NOTIFICATION=EmailThatWillSendNotificationsForNewUser - -# Default timezone for new users. Users can change this setting inside the -# application at their leisure. -# Must be exactly one of the timezones used in this list: -# https://github.com/monicahq/monica/blob/master/resources/views/settings/index.blade.php#L70 -APP_DEFAULT_TIMEZONE=US/Eastern - -# Ability to disable signups on your instance. -# Can be true or false. Default to false. -APP_DISABLE_SIGNUP=true - -# Frequency of creation of new log files. Logs are written when an error occurs. -# Possible values: single|daily|syslog|errorlog -APP_LOG=daily - -# Specific to the hosted version on .com. You probably don't need those. -# Let them empty if you don't need them. -GOOGLE_ANALYTICS_APP_ID= -INTERCOM_APP_ID= - -# Error tracking. Specific to hosted version on .com. You probably don't need -# those. -SENTRY_SUPPORT=false -SENTRY_DSN= - -# Send a daily ping to https://version.monicahq.com to check if a new version -# is available. When a new version is detected, you will have a message in the -# UI, as well as the release notes for the new changes. Can be true or false. -# Default to true. -CHECK_VERSION=true - -# Have access to paid features available on https://monicahq.com, for free. -# Can be true or false. Default to false. -# If set to true, that means your users will have to pay to access the paid -# features. We use Stripe to do this. -REQUIRES_SUBSCRIPTION=false - -# ONLY NECESSARY IF MONICA REQUIRES A SUBSCRIPTION TO WORK -# Leave blank unless you know what you are doing. -STRIPE_KEY= -STRIPE_SECRET= -paid_plan_monthly_friendly_name= -paid_plan_monthly_id= -paid_plan_monthly_price= - -# Change this only if you know what you are doing -CACHE_DRIVER=database -SESSION_DRIVER=file -QUEUE_DRIVER=sync - -# Default filesystem to store uploaded files. -# Possible values: public|s3 -DEFAULT_FILESYSTEM=public - -# AWS keys for S3 when using this storage method -AWS_KEY= -AWS_SECRET= -AWS_REGION=us-east-1 -AWS_BUCKET= -AWS_SERVER= -``` - -Then run the following instructions: -* Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. -* Open the file `.env` to set the different variables needed by the project. The file comes with predefined values - you won't have to change most of them. -* Run `php artisan setup:production` to run the migrations, seed the database and symlink folders. -* Optional: run `php artisan passport:install` to generate the secure asset tokens required for the API. If you don't plan to use the API, don't do this step. +`cd /var/www/monica` then run these steps with `sudo`: + +1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. +1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader` to install all packages. +1. Run `npm install` to install all the front-end dependencies and tools needed to compile assets. +1. Run `npm run production` to compile js and css assets. +1. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. +1. Run `php artisan setup:production` to run the migrations, seed the database and symlink folders. +1. Optional: run `php artisan passport:install` to create the access tokens required for the API (Optional). +1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. #### 8. Configure cron job As recommended by the generic installation instructions we create a cronjob which runs `artisan schedule:run` every minute. For this execute this command: -``` +```sh sudo crontab -e ``` And then add this line to the bottom of the window that opens. ``` -* * * * * sudo -u www-data php /var/www/html/artisan schedule:run +* * * * * sudo -u www-data php /var/www/monica/artisan schedule:run ``` #### 9. Configure Apache webserver We need to enable the rewrite module of the Apache webserver: -``` +```sh sudo a2enmod rewrite ``` diff --git a/docs/installation/docker.md b/docs/installation/docker.md index d8b3f47c48b..2187c089cac 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -10,11 +10,15 @@ quickly with a known working environment. Before you start, you need to get and edit a `.env` file. If you've already cloned the [Monica Git repo](https://github.com/monicahq/monica), run: -`$ cp .env.example .env` +```sh +cp .env.example .env +``` to create it. If not, you can fetch it from GitHub like: -`$ curl https://raw.githubusercontent.com/monicahq/monica/master/.env.example > .env` +```sh +curl -sS https://raw.githubusercontent.com/monicahq/monica/master/.env.example > .env +``` Then open `.env` in an editor and update it for your own needs: @@ -29,13 +33,13 @@ Note for macOS: you will need to stop Apache if you wish to have Monica availabl You can do this like so: ```sh -$ sudo /usr/sbin/apachectl stop +sudo /usr/sbin/apachectl stop ``` To start Apache up again use this command: ```sh -$ sudo /usr/sbin/apachectl start +sudo /usr/sbin/apachectl start ``` Now select one of these methods to be up and running quickly: @@ -49,8 +53,8 @@ with a pre-packaged MySQL database. Start by fetching the latest `docker-compose.yml` and `.env` if you haven't done that allready. ```sh -$ curl https://raw.githubusercontent.com/monicahq/monica/master/docker-compose.yml > docker-compose.yml -$ curl https://raw.githubusercontent.com/monicahq/monica/master/.env.example > .env +curl -sS https://raw.githubusercontent.com/monicahq/monica/master/docker-compose.yml > docker-compose.yml +curl -sS https://raw.githubusercontent.com/monicahq/monica/master/.env.example > .env ``` Edit the `docker-compose.yml` and change both the volumes on the monicahq service and the mysql service. Change the part before the `:` and point it to an existing, empty directory on your system. It is also be a good idea to change the webserver port from `80:80` to `3000:80`. diff --git a/docs/installation/generic.md b/docs/installation/generic.md index f2a83a8814f..5b4bdbc92fa 100644 --- a/docs/installation/generic.md +++ b/docs/installation/generic.md @@ -20,18 +20,64 @@ The official Monica installation uses mySQL as the database system and **this is Once the softwares above are installed: -1. Create a database called `monica` in your mySQL instance. This will let you store your data. -1. Clone the repository: `git clone https://github.com/monicahq/monica` in the folder you want to install the software to. -1. Run `cd monica` to go to the root of the newly created folder containing Monica's code. -1. Run `composer install` at the root of the folder Monica has been cloned. -1. Run `cp .env.example .env`. This will create the `.env` file that contains all the settings about Monica. +### 1. Clone the repository + +You may install Monica by simply closing the repository. Consider cloning the repository into any folder, example here in your 'home' directory: +```sh +cd ~ +git clone https://github.com/monicahq/monica.git +``` + +You should check out a tagged version of Monica since `master` branch may not always be stable. +Find the latest official version on the [release page](https://github.com/monicahq/monica/releases). +```sh +cd ~/monica +// Clone the desired version +git checkout tags/v1.6.2 +``` + +### 2. Setup the database + +Log in with the root account to configure the database. +```sh +mysql -uroot -p +``` + +Create a database called 'monica' +```sql +CREATE DATABASE monica; +``` + +Create a user called 'monica' and its password 'strongpassword'. + +```sql +CREATE USER 'monica'@'localhost' IDENTIFIED BY 'strongpassword'; +``` + +We have to authorize the new user on the monica db so that he is allowed to change the database. +```sql +GRANT ALL ON monica.* TO 'monica'@'localhost'; +``` + +And finally we apply the changes and exit the database. +```sql +FLUSH PRIVILEGES; +exit +``` + +### 3. Configure Monica + +`cd ~/monica` then run these steps: + +1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. +1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --no-dev` to install all packages. 1. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. -1. Open the file `.env` to set the different variables needed by the project. The file comes with predefined values - you won't have to change most of them. 1. Run `php artisan setup:production` to run the migrations, seed the database and symlink folders. +1. Optional: run `php artisan passport:install` to create the access tokens required for the API (Optional). +1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. 1. Finally, Monica requires some background processes to continuously run. The list of things Monica does in the background is described [here](https://github.com/monicahq/monica/blob/master/app/Console/Kernel.php#L33). To do this, setup a cron that runs every minute and triggers the following command `php artisan schedule:run`. -1. (optional) If you want to use the API, you need to run `php artisan passport:install`. This command will create the encryption keys needed to generate secure access tokens. -**Optional**: Setup the queues with Redis, Beanstalk or Amazon SQS +### 4. **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. @@ -49,4 +95,4 @@ There are several choices for the queue mechanism: 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](https://laravel.com/docs/5.4/queues#driver-prerequisites) on the topic. +To configure the other queues, refer to the [official Laravel documentation](https://laravel.com/docs/master/queues#driver-prerequisites) on the topic. diff --git a/docs/installation/update.md b/docs/installation/update.md index c54dcd3e16b..0877f73efa4 100644 --- a/docs/installation/update.md +++ b/docs/installation/update.md @@ -9,11 +9,21 @@ steps below to update it, **every single time**, or you will run into problems. 1. Check that your backup is valid. 1. Read the [release notes](https://github.com/monicahq/monica/blob/master/CHANGELOG) to check for breaking changes. +1. Update sources: + 1. Consider check out a tagged version of Monica since `master` branch may not always be stable. + Find the latest official version on the [release page](https://github.com/monicahq/monica/releases) + ```sh + // Clone the desired version + git checkout tags/v1.6.2 + ``` + 1. Or check out `master` + ```sh + git pull origin master + ``` 1. Then, run the following command at the root of the project: ``` -git pull origin master -composer install --no-interaction --prefer-dist --optimize-autoloader +composer install --no-interaction --prefer-dist --optimize-autoloader --no-suggest --no-dev php artisan migrate --force ``` From 0c77eab6a26d201f5a69fcd46442034080528016 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Fri, 16 Feb 2018 12:52:01 +0100 Subject: [PATCH 2/3] Update --- docs/installation/debian.md | 52 +++++++++++++----------------------- docs/installation/docker.md | 37 ++++++++++++------------- docs/installation/generic.md | 7 +++-- docs/installation/update.md | 2 +- 4 files changed, 39 insertions(+), 59 deletions(-) diff --git a/docs/installation/debian.md b/docs/installation/debian.md index 52e80a05e95..a997aa47bf6 100644 --- a/docs/installation/debian.md +++ b/docs/installation/debian.md @@ -18,7 +18,7 @@ You should check out a tagged version of Monica since `master` branch may not al Find the latest official version on the [release page](https://github.com/monicahq/monica/releases) ```sh cd /var/www/monica -// Clone the desired version +# Clone the desired version sudo git checkout tags/v1.6.2 ``` @@ -31,8 +31,8 @@ sudo chown -R www-data:www-data /var/www/monica #### 4. Install nodejs (this is needed for npm) ```sh -curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - -sudo apt-get install -y nodejs +curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - +sudo apt install -y nodejs ``` #### 5. Install composer @@ -56,13 +56,12 @@ Next log in with the root account to configure the database. sudo mysql -uroot -p ``` -Create a database called 'monica' +Create a database called 'monica'. ```sql CREATE DATABASE monica; ``` Create a user called 'monica' and its password 'strongpassword'. - ```sql CREATE USER 'monica'@'localhost' IDENTIFIED BY 'strongpassword'; ``` @@ -83,13 +82,13 @@ exit `cd /var/www/monica` then run these steps with `sudo`: 1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. -1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader` to install all packages. +1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. +1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --ignore-platform-reqs` to install all packages. 1. Run `npm install` to install all the front-end dependencies and tools needed to compile assets. 1. Run `npm run production` to compile js and css assets. 1. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. 1. Run `php artisan setup:production` to run the migrations, seed the database and symlink folders. 1. Optional: run `php artisan passport:install` to create the access tokens required for the API (Optional). -1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. #### 8. Configure cron job @@ -101,7 +100,6 @@ sudo crontab -e ``` And then add this line to the bottom of the window that opens. - ``` * * * * * sudo -u www-data php /var/www/monica/artisan schedule:run ``` @@ -109,42 +107,28 @@ And then add this line to the bottom of the window that opens. #### 9. Configure Apache webserver We need to enable the rewrite module of the Apache webserver: - ```sh sudo a2enmod rewrite ``` -Now look for this section in the `/etc/apache2/apache2.conf` file. +Edit `/etc/apache2/sites-enabled/000-default.conf` file. +* Update `DocumentRoot` property to: ``` - - Options Indexes FollowSymLinks - AllowOverride None - Require all granted - +DocumentRoot /var/www/monica/public ``` - -and change it to: - +* and add a new `Directory` directive: ``` - - Options Indexes FollowSymLinks - AllowOverride All - Require all granted + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted ``` -Save the apache2.conf file and open `/etc/apache2/sites-enabled/000-default.conf` and look for this line: - -``` -DocumentRoot /var/www/html -``` -and change it to: -``` -DocumentRoot /var/www/monica/public +Finally restart Apache. +```sh +sudo systemctl restart apache2 ``` -After you save the 000-default.conf file you can finally restart Apache and are up and running. -``` -sudo service apache2 restart -``` +Monica will be up and running to `http://localhost`. diff --git a/docs/installation/docker.md b/docs/installation/docker.md index 2187c089cac..dfc76d12ff4 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -59,22 +59,21 @@ curl -sS https://raw.githubusercontent.com/monicahq/monica/master/.env.example > Edit the `docker-compose.yml` and change both the volumes on the monicahq service and the mysql service. Change the part before the `:` and point it to an existing, empty directory on your system. It is also be a good idea to change the webserver port from `80:80` to `3000:80`. -Edit `.env` again to set `DB_HOST=mysql` (as `mysql` is the creative name of -the MySQL container). +Edit `.env` again to set `DB_HOST=mysql` (as `mysql` is the creative name of the MySQL container). Start by downloading all the images and setup your new instance. -```shell -$ docker-compose pull -$ docker-compose up +```sh +docker-compose pull +docker-compose up ``` Wait until all migrations are done and check if you can open up the login page by going to http://localhost:3000. If this looks ok, shut down the instance and add your first user account. -```shell -$ docker-compose run monicahq shell -$ php artisan setup:production -$ exit +```sh +docker-compose run monicahq shell +php artisan setup:production +exit ``` Start your instance again with `docker-compose up` and login. @@ -84,14 +83,13 @@ Start your instance again with `docker-compose up` and login. Use this process if you want to modify Monica source code and build your image to run. -Edit `.env` again to set `DB_HOST=mysql` (as `mysql` is the creative name of -the MySQL container). +Edit `.env` again to set `DB_HOST=mysql` (as `mysql` is the creative name of the MySQL container). Then run: -```shell -$ docker-compose build -$ docker-compose up +```sh +docker-compose build +docker-compose up ``` #### Use Docker directly to run with your own database @@ -99,14 +97,13 @@ $ docker-compose up Use this process if you're a developer and want complete control over your Monica container. -Edit `.env` again to set the `DB_*` variables to match your -database. Then run: +Edit `.env` again to set the `DB_*` variables to match your database. Then run: -```shell -$ docker build -t monicahq/monicahq . -$ docker run --env-file .env -p 80:80 monicahq/monicahq # to run MonicaHQ +```sh +docker build -t monicahq/monicahq . +docker run --env-file .env -p 80:80 monicahq/monicahq # to run MonicaHQ # ...or... -$ docker run --env-file .env -it monicahq/monicahq shell # to get a prompt +docker run --env-file .env -it monicahq/monicahq shell # to get a prompt ``` Note that uploaded files, like avatars, will disappear when you diff --git a/docs/installation/generic.md b/docs/installation/generic.md index 5b4bdbc92fa..d9becd1fb3e 100644 --- a/docs/installation/generic.md +++ b/docs/installation/generic.md @@ -32,7 +32,7 @@ You should check out a tagged version of Monica since `master` branch may not al Find the latest official version on the [release page](https://github.com/monicahq/monica/releases). ```sh cd ~/monica -// Clone the desired version +# Clone the desired version git checkout tags/v1.6.2 ``` @@ -43,13 +43,12 @@ Log in with the root account to configure the database. mysql -uroot -p ``` -Create a database called 'monica' +Create a database called 'monica'. ```sql CREATE DATABASE monica; ``` Create a user called 'monica' and its password 'strongpassword'. - ```sql CREATE USER 'monica'@'localhost' IDENTIFIED BY 'strongpassword'; ``` @@ -70,11 +69,11 @@ exit `cd ~/monica` then run these steps: 1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. +1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. 1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --no-dev` to install all packages. 1. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. 1. Run `php artisan setup:production` to run the migrations, seed the database and symlink folders. 1. Optional: run `php artisan passport:install` to create the access tokens required for the API (Optional). -1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. 1. Finally, Monica requires some background processes to continuously run. The list of things Monica does in the background is described [here](https://github.com/monicahq/monica/blob/master/app/Console/Kernel.php#L33). To do this, setup a cron that runs every minute and triggers the following command `php artisan schedule:run`. ### 4. **Optional**: Setup the queues with Redis, Beanstalk or Amazon SQS diff --git a/docs/installation/update.md b/docs/installation/update.md index 0877f73efa4..5d2d62e9983 100644 --- a/docs/installation/update.md +++ b/docs/installation/update.md @@ -13,7 +13,7 @@ to check for breaking changes. 1. Consider check out a tagged version of Monica since `master` branch may not always be stable. Find the latest official version on the [release page](https://github.com/monicahq/monica/releases) ```sh - // Clone the desired version + # Clone the desired version git checkout tags/v1.6.2 ``` 1. Or check out `master` From 67a8a6267648f898d18a4d29ff7583e0939da8c5 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Fri, 16 Feb 2018 21:50:58 +0100 Subject: [PATCH 3/3] composer install with --no-dev --- docs/installation/debian.md | 2 +- docs/installation/update.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/debian.md b/docs/installation/debian.md index a997aa47bf6..ed1c3373973 100644 --- a/docs/installation/debian.md +++ b/docs/installation/debian.md @@ -83,7 +83,7 @@ exit 1. `cp .env.example .env` to create your own version of all the environment variables needed for the project to work. 1. Update `.env` to your specific needs. Don't forget to set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. -1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --ignore-platform-reqs` to install all packages. +1. Run `composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --no-dev --ignore-platform-reqs` to install all packages. 1. Run `npm install` to install all the front-end dependencies and tools needed to compile assets. 1. Run `npm run production` to compile js and css assets. 1. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. diff --git a/docs/installation/update.md b/docs/installation/update.md index 5d2d62e9983..5e88a9b8980 100644 --- a/docs/installation/update.md +++ b/docs/installation/update.md @@ -23,7 +23,7 @@ to check for breaking changes. 1. Then, run the following command at the root of the project: ``` -composer install --no-interaction --prefer-dist --optimize-autoloader --no-suggest --no-dev +composer install --no-interaction --prefer-dist --no-suggest --optimize-autoloader --no-dev php artisan migrate --force ```