docs: corrected initial setup instructions (#5095)

This commit is contained in:
Michael Bianco
2021-05-20 14:35:00 -06:00
committed by GitHub
parent e26c408567
commit 104eca996f
4 changed files with 29 additions and 12 deletions
-1
View File
@@ -30,7 +30,6 @@ Please read the list below. Feel free to delete this text after but we need you
- [ ] Make sure account reset and deletion still work.
#### Other tasks
- [ ] [CHANGELOG](https://github.com/monicahq/monica/blob/master/CHANGELOG.md) entry added, if necessary, under `UNRELEASED`.
- [ ] [CONTRIBUTORS](https://github.com/monicahq/monica/blob/master/CONTRIBUTORS) entry added, if necessary.
- [ ] If it's relevant and worth mentioning, create a changelog entry for this change. The changelog entry will appear inside the UI for all users to see. To know if your change is worth the creation of a changelog entry, [read the documentation](https://github.com/monicahq/monica/blob/master/docs/administrators/tips.md#when-is-it-relevant-to-create-a-changelog-entry).
- [ ] Don't forget to [ask for a free account](mailto:regis@monicahq.com) on https://monicahq.com as anyone who contributes can request a free account.
+2
View File
@@ -0,0 +1,2 @@
php 8.0.6
nodejs 15.14.0
+1
View File
@@ -50,3 +50,4 @@ Russell Ault @RussellAult
Martijn van der Ven @Zegnat <martijn@vanderven.se>
Matthew Fitzgerald @mfitzgerald2 <matt@mfitz.net>
Simon Van Accoleyen @SimonVanacco <simon@vanacco.fr>
Michael Bianco <mike@mikebian.co>
+26 -11
View File
@@ -5,6 +5,7 @@
- [Install Monica locally](#install-monica-locally)
- [Homestead (macOS, Linux, Windows)](#homestead-macos-linux-windows)
- [Valet (macOS)](#valet-macos)
- [asdf (macOS)](#asdf-macos)
- [Instructions](#instructions)
- [Testing environment](#testing-environment)
- [Setup](#setup)
@@ -75,6 +76,20 @@ Note: the official Monica installation uses mySQL as the database system. While
We've installed the development version with [Valet](https://laravel.com/docs/valet), which is a Laravel development environment for Mac minimalists. It works really well and is extremely fast, much faster than Homestead.
<a id="markdown-instructions" name="instructions"></a>
### asdf (macOS)
You can use [asdf](https://asdf-vm.com/#/) to install a version of php for monica:
```bash
asdf install
asdf reshim
pecl install redis
echo "extension=redis.so" > $(asdf where php)/conf.d/php.ini
```
You'll need to run the installation instructions below and setup a local mysql installation. After completing the application installation process you can run `php artisan serve` to get a local development server.
### Instructions
**Prerequisites**:
@@ -89,22 +104,22 @@ We've installed the development version with [Valet](https://laravel.com/docs/va
Once the above softwares are installed (or if you've finished the installation of Homestead/Valet):
1. Create a database called `monica` in your mySQL instance.
1. From Homestead directory: `sudo scripts/create-mysql.sh monica` or `mysql -e "CREATE DATABASE 'monica'";` inside mySQL.
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. `mysql -e "CREATE DATABASE monica";` inside mySQL.
2. If you use Homestead (which uses Vagrant under the hood), `vagrant ssh` will let you login as root inside your VM.
2. Setup the application environment:
1. `composer install --no-interaction` to install all packages.
- Due to an issue with VirtualBox, you may encounter an error at this step due to a plug-in called `package-versions`. If this happens, delete the /vendor folder that was created and run `composer install --no-interaction --no-plugins --no-scripts` instead.
- See this [GitHub Issue](https://github.com/laravel/homestead/issues/1240) for more information.
1. `yarn install` to install all the front-end dependencies and tools needed to compile assets.
- Run `cp .env.example .env` to create your own version of all the environment variables needed for the project to work.
2. `yarn install` to install all the front-end dependencies and tools needed to compile assets.
- If you experience an error related to `EPROTO: protocol error, symlink`, see [here](https://github.com/yarnpkg/yarn/issues/4908).
1. `yarn 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.
1. `php artisan setup:test` to setup the database.
3. `yarn run dev` to compile js and css assets.
4. `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically.
5. `php artisan setup:test` to setup the database.
- By default this command will also populate the database with fake data.
- Use the `--skipSeed` option to skip the process of adding fake data in your dev environment.
1. `php artisan passport:install` to create the access tokens required for the API (Optional).
1. Update `.env` to your specific needs.
6. `php artisan passport:install` to create the access tokens required for the API (Optional).
3. Update `.env` to your specific needs.
If you haven't skipped the seeding of fake data, two accounts are created by default:
@@ -127,7 +142,7 @@ We try to cover most features and new methods with unit and functional tests. An
To setup the test environment:
* Create a database called `monica_test`
* Create a database `mysql -e "CREATE DATABASE monica_test;"`
* `php artisan migrate --database testing`
- If this fails due to the `oauth_auth_codes_table` already existing, edit `config/passport.php` to update the storage driver so `'connection' => 'testing'`, then run `php artisan migrate --database testing` again.
- For more information, see this [GitHub Issue](https://github.com/laravel/passport/issues/1370).