---
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- MYSQL_PASSWORD=Set_this_password!! #change this password for the sql
database
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
links:
- mariadb
volumes:
- ~/Docker/Nextcloud/config:/config #change the pathway of the directory
if necessary
- ~/Docker/Nextcloud/data:/data #change the pathway of the directory
if necessary
ports:
- 443:443 # change the internal to something else. The internal port is
the 443 for the container
restart: always
mariadb:
image: linuxserver/mariadb
container_name: mariadb2
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=Set_this_Password!! #change this password for the
root password of the maria database
- TZ=America/”New York” #set the timezone to your timezone
- MYSQL_PASSWORD=Set_this_password!! #this password should be the same
as the above in the nextcloud instance
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
volumes:
- ~/Docker/Nextcloud/mariadb:/config #change the pathway if necessary
ports:
- 3306:3306 #leave this port alone unless it interferes with another container.
restart: always