- Install PHP and a web server like Nginx. If you are on macOS, we recommend Valet
- Install SQLite or MySQL
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
yarn install --frozen-lockfile
cp .env.example .env
and configure.env
filephp artisan key:generate --no-interaction
(generates APP_KEY)touch monica.db
(if you use SQLite) and add the path to DB_DATABASE
php artisan monica:setup --force -vvv
- Optional: generate dummy data
php artisan monica:dummy --force -vvv
- Optional: make the search work:
- Install and run meilisearch locally
- Configure and run a queue (
php artisan queue:listen --queue=high,low,default
)
yarn build
to generate the proper JS and CSS filesyarn dev
and head to your browser to play with Monica
Search in production is done with Meilisearch. As we use Laravel Scout, you can use other drivers if you prefer.
That being said, if you want to index new data, or add additional data to search data for, you need to indicate all the indexes of this new data in SetupApplication.php – otherwise, Meilisearch won't know the indexes and you will end up with an error message saying that data is not filterable.
We have a docker image that you can use to run this project locally.
First you need setup authentication to the Container registry
Then play with the image:
docker run -p 8080:80 ghcr.io/monicahq/monica-next:main
This runs the image locally on port 8080 and using sqlite. You can then access the application at http://localhost:8080.
Note that you'll need to setup a mail mailer to be able to register a user.
You can try to use the log
mailer like this:
docker run -p 8080:80 -e MAIL_MAILER=log ghcr.io/monicahq/monica-next:main
For more complex scenario (database setup, queue, etc.) see https://github.com/monicahq/docker/tree/main/.examples
You can also build your image locally using yarn docker:build
and run it with yarn docker:run
.