fixed up monica with current template

This commit is contained in:
2026-07-14 21:29:46 -07:00
parent b8f16190d4
commit 566773bfd7
4 changed files with 119 additions and 30 deletions
+60 -12
View File
@@ -1,22 +1,70 @@
# Monica Personal CRM
Last Updated: Wed December 04, 2024 06:34:09 PDT
## Overview
Docker Hub: https://hub.docker.com/_/monica
Project: https://www.monicahq.com/
Proxy Port: 80
Monica is an open-source personal relationship manager. This stack runs Monica with a MariaDB database.
## Description
## Project Details
Personal Customer Relationship Manager
- **Project Repository:** [https://github.com/monicahq/monica](https://github.com/monicahq/monica)
- **Container Image:** [Docker Hub](https://hub.docker.com/_/monica)
- **Documentation:** [https://www.monicahq.com/](https://www.monicahq.com/)
- **Reverse Proxy Port:** `80`
## Notes
## Getting Started
Importing directly to the db (phpmydadmin)
you have to run the following in the container: ```php artisan bookstack:regenerate-permissions```
1. Start the stack: `docker compose up -d`
2. Open http://localhost:${MONICA_PORT:-8081} in your browser
3. Follow the setup wizard
### Sample ENV
## Environment Variable Notes
https://raw.githubusercontent.com/monicahq/monica/master/.env.example
VOL_PATH base path for persistent data volumes
VOL_PROJECTS base path for project directories
MONICA_IMAGE Monica container image (default: monica:latest)
MONICA_RESTART restart policy (default: unless-stopped)
MONICA_PORT host port mapped to container port 80 (default: 8081)
MONICA_APP_ENV application environment (default: production)
MONICA_DB_IMAGE MariaDB container image (default: mariadb:11)
MONICA_DB_PASSWORD Monica database password
MONICA_MYSQL_ROOT_PASSWORD MariaDB root password
## Volume Notes
${VOL_PATH}/monica_dev/db MariaDB data directory
${VOL_PATH}/monica_dev/storage Monica storage (avatars, exports, etc.)
## Network Notes
Requires the external `proxy` network (Nginx Proxy Manager). An internal bridge network `internal` is created for inter-service communication.
## Docker Run
```bash
docker run -d \
--name monica \
-v ${VOL_PATH:-/data}/monica_dev/storage:/var/www/html/storage \
-e DB_HOST=monica-db \
-e DB_USERNAME=monica \
-e DB_PASSWORD=changeme \
-e DB_DATABASE=monica \
-e APP_ENV=production \
-p 8081:80 \
--network proxy \
monica:latest
```
## Additional Notes / Gotchas
- After making changes via the database, run `php artisan migrate` inside the Monica container to apply schema changes.
## Dockhand Stack, Deploy from Git
Cookbooks Repository
stackname: MONICA_DEV
Compose file path: monica_dev/compose.yaml
Additional env file (optional): monica_dev/sample.env
Then "Load" monica_dev/sample.env into the Environmental variables in dockhand
Create the Stack
+48
View File
@@ -0,0 +1,48 @@
# Monica Personal CRM
services:
monica-db:
image: ${MONICA_DB_IMAGE:-mariadb:11}
restart: ${MONICA_RESTART:-unless-stopped}
volumes:
- ${VOL_PATH:-/data}/monica_dev/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MONICA_MYSQL_ROOT_PASSWORD:-changeme}
- MYSQL_DATABASE=monica
- MYSQL_USER=monica
- MYSQL_PASSWORD=${MONICA_DB_PASSWORD:-changeme}
networks:
- internal
monica:
image: ${MONICA_IMAGE:-monica:latest}
restart: ${MONICA_RESTART:-unless-stopped}
volumes:
- ${VOL_PATH:-/data}/monica_dev/storage:/var/www/html/storage
environment:
- DB_HOST=monica-db
- DB_USERNAME=monica
- DB_PASSWORD=${MONICA_DB_PASSWORD:-changeme}
- DB_DATABASE=monica
- APP_ENV=${MONICA_APP_ENV:-production}
ports:
- "${MONICA_PORT:-8081}:80"
networks:
- proxy
- internal
depends_on:
- monica-db
networks:
proxy:
external: true
internal:
driver: bridge
-11
View File
@@ -1,11 +0,0 @@
services:
monica:
image: ${MONICA_IMAGE:-latest}
restart: unless-stopped
environment:
- DB_HOST=${MONICA_DB_HOST:-monica-db}
- DB_USERNAME=${MONICA_DB_USERNAME:-monica}
- DB_PASSWORD=${MONICA_DB_PASSWORD:-changeme}
- APP_ENV=${MONICA_APP_ENV:-production}
volumes:
- ${VOL_PATH}/monica:/var/www/html/storage
+11 -7
View File
@@ -1,10 +1,14 @@
# ===== Paths =====
VOL_PATH=/data
VOL_PROJECTS=/data/projects
COOKBOOK=/git/docker-compose-cookbooks #HELP: cookbooks
VOL_PATH=./data #HELP: volpath
# Monica
# ===== Monica =====
MONICA_IMAGE=monica:latest
MONICA_DB_HOST=monica-db
MONICA_DB_USERNAME=monica
MONICA_DB_PASSWORD=changeme
MONICA_RESTART=unless-stopped
MONICA_PORT=8081
MONICA_APP_ENV=production
# ===== Database =====
MONICA_DB_IMAGE=mariadb:11
MONICA_DB_PASSWORD=changeme
MONICA_MYSQL_ROOT_PASSWORD=changeme-root