-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove assets from repository (#4759)
BREAKING CHANGE: The assets are no longer embedded in source code: javascript, css, font files. Run `yarn install` then `yarn run production` to recreate them from sources, or download a [release file](https://github.com/monicahq/monica/releases) that contains compiled files. BREAKING CHANGE: For Heroku users: You'll have to manually go to `Settings` > `Buildpacks` and add buildpack: `nodejs`. See [this doc](https://github.com/monicahq/monica/blob/master/docs/installation/providers/heroku.md#update-from-2x-to-3x). BREAKING CHANGE: See more information about how to install a Monica instance [here](https://github.com/monicahq/monica/tree/master/docs/installation).
- Loading branch information
Showing
56 changed files
with
140 additions
and
3,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
/vendor | ||
/resources/vendor | ||
.scannerwork/ | ||
/node_modules | ||
/public/storage | ||
/persist | ||
Homestead.yaml | ||
Homestead.json | ||
.env | ||
cypress.env.json | ||
/public/css | ||
/public/fonts | ||
/public/hot | ||
/public/js | ||
/public/storage | ||
/public/mix-manifest.json | ||
/resources/vendor | ||
/results | ||
/storage/oauth-private.key | ||
/storage/oauth-public.key | ||
.DS_Store | ||
npm-debug.log* | ||
/results | ||
.deploy.json | ||
yarn-error.log | ||
/tests/cypress/screenshots | ||
/tests/cypress/videos | ||
php-extensions-*.tar.bz2 | ||
monicadump.sql | ||
.scannerwork/ | ||
.phpunit.result.cache | ||
/vendor | ||
.composer | ||
.env | ||
.deploy.json | ||
.DS_Store | ||
.idea | ||
.phpunit.result.cache | ||
.sentry-release | ||
cypress.env.json | ||
Homestead.yaml | ||
Homestead.json | ||
monicadump.sql | ||
npm-debug.log* | ||
php-extensions-*.tar.bz2 | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ Monica depends on the following: | |
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) | ||
- PHP 7.4+ | ||
- [Composer](https://getcomposer.org/) | ||
- [Node.js](https://nodejs.org) | ||
- [Yarn](https://yarnpkg.com) | ||
- MySQL / MariaDB | ||
|
||
An editor like vim or nano should be useful too. | ||
|
@@ -53,6 +55,19 @@ sudo apt install -y php php-bcmath php-curl php-gd php-gmp php-imagick \ | |
sudo apt install -y composer | ||
``` | ||
|
||
**Node.js:** Install node.js with package manager. | ||
|
||
```sh | ||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo bash - | ||
sudo apt install -y nodejs | ||
``` | ||
|
||
**Yarn:** Install yarn with npm. | ||
|
||
```sh | ||
sudo npm install --global yarn | ||
``` | ||
|
||
**MariaDB:** Install MariaDB. Note that this only installs the package, but does not setup Mysql. This is done later in the instructions: | ||
|
||
```sh | ||
|
@@ -77,8 +92,10 @@ Find the latest official version on the [release page](https://github.com/monica | |
|
||
```sh | ||
cd /var/www/monica | ||
# Get latest tags from GitHub | ||
sudo git fetch | ||
# Clone the desired version | ||
sudo git checkout tags/v1.6.2 | ||
sudo git checkout tags/v2.18.0 | ||
``` | ||
|
||
### 2. Setup the database | ||
|
@@ -125,16 +142,17 @@ 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. Update `.env` to your specific needs | ||
2. Update `.env` to your specific needs | ||
- set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. | ||
- configure a [mailserver](/docs/installation/mail.md) for registration & reminders to work correctly. | ||
- set the `APP_ENV` variable to `production`, `local` is only used for the development version. Beware: setting `APP_ENV` to `production` will force HTTPS. Skip this if you're running Monica locally. | ||
1. Run `composer install --no-interaction --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 -v` to run the migrations, seed the database and symlink folders. | ||
3. Run `composer install --no-interaction --no-dev` to install all packages. | ||
4. Run `yarn install` to install frontend packages, then `yarn run production` to build the assets (js, css). | ||
5. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. | ||
6. Run `php artisan setup:production -v` to run the migrations, seed the database and symlink folders. | ||
- You can use `email` and `password` parameter to setup a first account directly: `php artisan setup:production [email protected] --password=yourpassword -v` | ||
1. _Optional_: Setup the queues with Redis, Beanstalk or Amazon SQS: see optional instruction of [generic installation](generic.md#setup-queues) | ||
1. _Optional_: Setup the access tokens to use the API follow optional instruction of [generic installation](generic.md#setup-access-tokens) | ||
7. _Optional_: Setup the queues with Redis, Beanstalk or Amazon SQS: see optional instruction of [generic installation](generic.md#setup-queues) | ||
8. _Optional_: Setup the access tokens to use the API follow optional instruction of [generic installation](generic.md#setup-access-tokens) | ||
|
||
### 4. Configure cron job | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ Monica depends on the following: | |
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) | ||
- PHP 7.4+ | ||
- [Composer](https://getcomposer.org/) | ||
- [Node.js](https://nodejs.org) | ||
- [Yarn](https://yarnpkg.com) | ||
- [MySQL](https://support.rackspace.com/how-to/installing-mysql-server-on-ubuntu/) | ||
|
||
**Apache:** If it doesn't come pre-installed with your server, follow the [instructions here](https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04#step-1-install-apache-and-allow-in-firewall) to setup Apache and config the firewall. | ||
|
@@ -53,9 +55,9 @@ Then install php 7.4 with these extensions: | |
|
||
```sh | ||
sudo apt update | ||
sudo apt install -y php7.4 php7.4-bcmath php7.4-cli php7.4-curl php7.4-common php7.4-fpm \ | ||
php7.4-gd php7.4-gmp php7.4-imagick php7.4-intl php7.4-json php7.4-mbstring \ | ||
php7.4-mysql php7.4-opcache php7.4-redis php7.4-xml php7.4-zip | ||
sudo apt install -y php7.4 php7.4-bcmath php7.4-cli php7.4-curl php7.4-common \ | ||
php7.4-fpm php7.4-gd php7.4-gmp php7.4-imagick php7.4-intl php7.4-json \ | ||
php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-redis php7.4-xml php7.4-zip | ||
``` | ||
|
||
**Composer:** After you're done installing PHP, you'll need the [Composer](https://getcomposer.org/download/) dependency manager. | ||
|
@@ -69,6 +71,19 @@ rm -f composer-setup.php | |
|
||
(or you can follow instruction on [getcomposer.org](https://getcomposer.org/download/) page) | ||
|
||
**Node.js:** Install node.js with package manager. | ||
|
||
```sh | ||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - | ||
sudo apt install -y nodejs | ||
``` | ||
|
||
**Yarn:** Install yarn with npm. | ||
|
||
```sh | ||
sudo npm install --global yarn | ||
``` | ||
|
||
**Mysql:** Install Mysql 5.7. Note that this only installs the package, but does not setup Mysql. This is done later in the instructions: | ||
|
||
```sh | ||
|
@@ -97,7 +112,10 @@ You should check out a tagged version of Monica since `master` branch may not al | |
|
||
```sh | ||
cd /var/www/monica | ||
git checkout tags/v2.2.1 | ||
# Get latest tags from GitHub | ||
git fetch | ||
# Clone the desired version | ||
git checkout tags/v2.18.0 | ||
``` | ||
|
||
### 2. Setup the database | ||
|
@@ -138,16 +156,17 @@ exit | |
`cd /var/www/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 | ||
2. Update `.env` to your specific needs | ||
- set `DB_USERNAME` and `DB_PASSWORD` with the settings used behind. | ||
- configure a [mailserver](/docs/installation/mail.md) for registration & reminders to work correctly. | ||
- set the `APP_ENV` variable to `production`, `local` is only used for the development version. Beware: setting `APP_ENV` to `production` will force HTTPS. Skip this if you're running Monica locally. | ||
1. Run `composer install --no-interaction --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 -v` to run the migrations, seed the database and symlink folders. | ||
3. Run `composer install --no-interaction --no-dev` to install all packages. | ||
4. Run `yarn install` to install frontend packages, then `yarn run production` to build the assets (js, css). | ||
5. Run `php artisan key:generate` to generate an application key. This will set `APP_KEY` with the right value automatically. | ||
6. Run `php artisan setup:production -v` to run the migrations, seed the database and symlink folders. | ||
- You can use `email` and `password` parameter to setup a first account directly: `php artisan setup:production [email protected] --password=yourpassword -v` | ||
1. _Optional_: Setup the queues with Redis, Beanstalk or Amazon SQS: see optional instruction of [generic installation](generic.md#setup-queues) | ||
1. _Optional_: Setup the access tokens to use the API follow optional instruction of [generic installation](generic.md#setup-access-tokens) | ||
7. _Optional_: Setup the queues with Redis, Beanstalk or Amazon SQS: see optional instruction of [generic installation](generic.md#setup-queues) | ||
8. _Optional_: Setup the access tokens to use the API follow optional instruction of [generic installation](generic.md#setup-access-tokens) | ||
|
||
### 4. Configure cron job | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.