Created
April 12, 2021 19:24
-
-
Save dnburgess/62ff05d0cddd3a78cd34a48a57d17f2e to your computer and use it in GitHub Desktop.
DB Tech Monica Personal Relationship Manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
app: | |
image: monica | |
depends_on: | |
- db | |
ports: | |
- 8485:80 | |
environment: | |
- APP_KEY=MiHe3JFtqFwnFaLC2X8tUzXsk56ExAKD #change this to another 32 character string. | |
- DB_HOST=db | |
volumes: | |
- /srv/dev-disk-by-uuid-0d4a201c-b292-412d-ade6-cc5561e54f1f/Configs/Monica2:/var/www/html/storage | |
restart: always | |
db: | |
image: mysql:5.7 | |
environment: | |
- MYSQL_RANDOM_ROOT_PASSWORD=true | |
- MYSQL_DATABASE=monica | |
- MYSQL_USER=homestead | |
- MYSQL_PASSWORD=secret | |
volumes: | |
- /srv/dev-disk-by-uuid-0d4a201c-b292-412d-ade6-cc5561e54f1f/Databases/Monica2:/var/lib/mysql | |
restart: always |
I managed to solve my issue by deleting everything previously, all orphaned folders under the docker folder and all volumes/images etc. I then used this stack:
version: "2"
services:
monica:
container_name: monica
image: monica
depends_on:
- monicadb
ports:
- 8008:80
environment:
- APP_KEY=some random 32 character string
- DB_HOST=monicadb
volumes:
- /home/xyz/docker/monica:/var/www/html/storage
restart: always
monicadb:
container_name: monicadb
image: mysql:5.7
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=monica
- MYSQL_USER=homestead
- MYSQL_PASSWORD=secret
volumes:
- /home/xyz/docker/monicadb:/var/lib/mysql
restart: always
It fired straight up first time without issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This 'Mysql:5.7' does not work for ARM Architecture - see error here - docker-library/mysql#350
I also swapped out the mysql database for the 'yobasystems' one that you used for NGINX-proxy-manager; but the Monica App could not connect to the DB with errors like the following >
Access denied for user 'homestead'@'172.23.0.3
(even though MySQL_USER and PASSWORD were changed).
I also added the
json.config
file as per the NGINX instructions, but same error as above.