Installation
The service can be installed through the Portainer web interface.
Learn about creating a new stack.
Docker Compose
Use the following code to install the service:
---
services:
app:
image: monica:apache
depends_on:
- db
ports:
- 9011:80
environment:
- DB_HOST=db
- DB_USERNAME=${DB_USER}
- DB_PASSWORD=${DB_PASS}
- APP_URL=${APP_URL}
- APP_KEY=${APP_KEY}
volumes:
# Persistent Data
- /srv/monica/config:/var/www/html/storage
restart: unless-stopped
db:
image: lscr.io/linuxserver/mariadb:11
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=monica
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
volumes:
- /srv/monica/db:/var/lib/mysql
restart: unless-stopped
Environment
Use the following environment to configure the service using the values prepared earlier:
DB_USER=
DB_PASS=
APP_URL=monica.example.com
APP_KEY=