You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Easiest path is the Docker-based dev environment — it bundles MySQL so you don't have to provision a DB yourself.
1. Clone + env
git clone https://github.com/brycehans/monica.git monica && cd monica
cp .env.example .env
The dev container reads its own .env.dev via env_file: in the compose file (DB host mysql, db monica, user homestead / pass secret), so it works out of the box without further tweaks. The .env you just copied is for host-side php artisan commands; ignore it if you'll only drive Monica via the container.
2. Build front-end assets on the host
The dev compose mounts ./public/build:/var/www/html/public/build, so the container's Apache serves whatever the host last built. Run once before bringing the stack up — otherwise the mount overlays the image's baked-in assets with an empty directory and every blade page 500s on the missing manifest.json:
yarn install
yarn run prod
For ongoing iteration, yarn run watch rebuilds incrementally on file change; the container picks up the new bundle on the next request.
Skip this section if you're using the Docker stack from step 3. The dev image already bakes in composer install, and the entrypoint auto-runs php artisan key:generate, migrations, and passport key generation on first boot. (yarn install + yarn run prod from step 2 cover the JS side either way — that step is required for both workflows now.)
If you're running Monica directly on the host instead, run these on the host:
composer install
php artisan key:generate
5. Seed the DB
php artisan setup:test
Inside the Docker app container, prefix with docker compose -f docker-compose.dev.yml exec app.
Logs in at admin@admin.com / admin0 with a populated account (20 fake contacts). Also creates a blank account at blank@blank.com / blank0 for empty-state screens.
That's it — log in via the browser and click around. Mail goes to MailHog at :8025 rather than the real internet, so reminder/notification flows are safe to trigger.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Easiest path is the Docker-based dev environment — it bundles MySQL so you don't have to provision a DB yourself.
1. Clone + env
The dev container reads its own
.env.devviaenv_file:in the compose file (DB hostmysql, dbmonica, userhomestead/ passsecret), so it works out of the box without further tweaks. The.envyou just copied is for host-sidephp artisancommands; ignore it if you'll only drive Monica via the container.2. Build front-end assets on the host
The dev compose mounts
./public/build:/var/www/html/public/build, so the container's Apache serves whatever the host last built. Run once before bringing the stack up — otherwise the mount overlays the image's baked-in assets with an empty directory and every blade page 500s on the missingmanifest.json:For ongoing iteration,
yarn run watchrebuilds incrementally on file change; the container picks up the new bundle on the next request.3. Bring up the stack
That gives you:
If any of those ports are already taken (e.g. another Monica clone is already running), all five are overridable via env vars:
4. (Non-Docker workflow only) Install PHP deps + key
Skip this section if you're using the Docker stack from step 3. The dev image already bakes in
composer install, and the entrypoint auto-runsphp artisan key:generate, migrations, and passport key generation on first boot. (yarn install+yarn run prodfrom step 2 cover the JS side either way — that step is required for both workflows now.)If you're running Monica directly on the host instead, run these on the host:
5. Seed the DB
Inside the Docker app container, prefix with
docker compose -f docker-compose.dev.yml exec app.Logs in at admin@admin.com / admin0 with a populated account (20 fake contacts). Also creates a blank account at blank@blank.com / blank0 for empty-state screens.
That's it — log in via the browser and click around. Mail goes to MailHog at :8025 rather than the real internet, so reminder/notification flows are safe to trigger.
Beta Was this translation helpful? Give feedback.
All reactions