version: '3'
services:
nextcloud:
image: nextcloud
ports:
- 8085:80
volumes:
- /mnt/md0/apps/nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=[redacted]
depends_on:
- db
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=[redacted]
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=[redacted]
volumes:
- /mnt/md0/apps/nextcloud/db:/var/lib/mysql
volumes:
nextcloud:
db:
```
I did need to make the following changes to `<path to mnt>/config/config.phg`, otherwise you will get an error when trying to access the site outside of the host's localhost.
```php
'trusted_domains' =>
[
'localhost',
'<server_ip',
'nextcloud.<domain>.com'
],