docker-compose.yml
version: '3.8'
services:
mariadb:
image: mariadb
restart: unless-stopped
ports:
- 3306:3306
volumes:
- ./mariadb:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=nextcloud
- MARIADB_DATABASE=nextcloud
- MARIADB_USER=nextcloud
- MARIADB_PASSWORD=nextcloud
nextcloud:
image: nextcloud
restart: unless-stopped
ports:
- 8181:80
depends_on:
- mariadb
environment:
- MYSQL_HOST=mariadb
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=nextcloud
volumes:
- ./nextcloud:/var/www/html