Course Hero Logo

update.md - # Update your server <!- omit in toc -> -...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 3 out of 6 pages.

# Update your server <!-- omit in toc -->- [Generic instructions](#generic-instructions)- [Updating Heroku instance](#updating-heroku-instance)- [Importing vCards (CLI only)](#importing-vcards-cli-only)- [Importing SQL from the exporter feature](#importing-sql-from-the-exporter-feature)- [Importing SQL into Heroku](#importing-sql-into-heroku)- [WARNING: This will delete your current database. Only use on freshinstallations, or if you know what you're doing.](#warning-this-will-delete-your-current-database-only-use-on-fresh-installations-or-if-you-know-what-youre-doing)## Generic instructionsMonica uses the concept of releases and tries to follow[Semantic Versioning]() as much as possible. If you run theproject locally,or if you have installed Monica on your own server, you need to follow the stepsbelow to update it, **every single time**, or you will run into problems.1. Always make a backup of your data before upgrading.2. Check that your backup is valid.3. Read the [release notes]() to check for breakingchanges.4. Update sources:1. Consider check out a tagged version of Monica since `master` branch may notalways be stable.Find the latest official version on the [release page]()```sh# Get latest tags from GitHubgit fetch# Clone the desired versiongit checkout tags/v2.18.0```2. Or check out `master````shgit pull origin master```5. Update the dependencies of the project:```shcomposer install --no-interaction --no-dev```6. Run `yarn install` to install frontend packages, then `yarn run production` tobuild the assets (js, css).7. Then, run the following command to make the proper update:```shphp artisan monica:update --force```The `monica:update` command will run migrations scripts for database, and flush allcache for config, route, and view, as an optimization process. It's easier than runevery need command independently.Note: if you have just change some setting in your `.env` file, as theconfiguration of the application is cached, any update on the `.env` file will notbe detected after that. You may have to run `php artisan config:cache` manually
after every update of `.env` file.## Updating Heroku instanceYou can update your Monica instance to the latest version by cloning the repositoryand pushing it to Heroku git.1. Clone the Monica repository to your local environment by `git clone`.1. Add your app's heroku git repository by `heroku git:remote -a (heroku app name)`(this of course requires the [Heroku CLI]().1. Push to heroku by `git push heroku master`. Heroku will build and update therepository, automatically.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 6 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
N/A
Tags
MYSQL, Monica, Heroku

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture