-
-
Save dnburgess/62ff05d0cddd3a78cd34a48a57d17f2e to your computer and use it in GitHub Desktop.
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 |
This 'Mysql:5.7' does not work for ARM Architecture - see error here - docker-library/mysql#350
(Pulling db (mysql:5.7)...
5.7: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries)
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.
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.
I tried this, but cannot get it to work. I get the error:
" [PDOException (1045)]
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'172.23.0.3' (using password: YES) "
I changed the App_key, and also the user and password, but there still seems to be a trace to homestead. Even if I leave everything identical to the above, it's throwing the above error. Any ideas? thx