Setting up a MariaDB, Blog, Nextcloud on RancherOS

When i set up RancherOS i added some persistent storage in from of network shares from FreeNAS

host shares:    ------   iohyve:RancherOS  ----- inside the container
@192.168.0.2             @192.168.0.16           

/mnt/zpool/docker       /mnt/docker             :volumes in docker-compose.yml
/mnt/zpool/dbs          /mnt/dbs
/mnt/zpool/data         /mnt/data

I am quite new to rancher so the first approach is always to run a docker run command without -d to see what happens when I write to my NFS storage space. Following, i create a stack and play with the configurations until everything works as expected. That being said you can create your docker-compose.yml and rancher-compose.yml files.

In this case: I wanted to have a decent working cloud, a mysql database, and a simple Blog where I can write some notes down.

docker-compose.yml

version: '2'
services:
  mariadb:
    image: linuxserver/mariadb
    hostname: mariadb
    environment:
      PGID: '1000'
      PUID: '1000'
      MYSQL_ROOT_PASSWORD: 'passwordofyourchoice'
      TZ: 'Europe/Berlin'
    stdin_open: true
    tty: true
    ports:
    - 3306:3306/tcp
    labels:
      io.rancher.container.pull_image: always
  nextcloud:
    image: linuxserver/nextcloud
    hostname: nextcloud
    environment:
      PGID: '1000'
      PUID: '1000'
    volumes:
    - /mnt/docker/rancher/nextcloud:/config
    - /mnt/data/sorted-data/scientific-data:/scientific-data
    stdin_open: true
    tty: true
    ports:
    - 2480:80/tcp
    - 2443:443/tcp
    labels:
      io.rancher.container.pull_image: always
  freshrss:
    image: linuxserver/freshrss
    hostname: freshrss
    environment:
      PGID: '1000'
      PUID: '1000'
      TZ: 'Europe/Berlin'
    volumes:
    - /mnt/docker/rancher/freshrss:/config
    stdin_open: true
    tty: true
    ports:
    - 2280:80/tcp
    labels:
      io.rancher.container.pull_image: always
  ghost:
    image: ghost
    hostname: ghost
    volumes:
    - /mnt/docker/rancher/ghost:/var/lib/ghost
    stdin_open: true
    tty: true
    ports:
    - 2368:2368/tcp
    labels:
      io.rancher.container.pull_image: always

rancher-compose.yml

version: '2'
services:
  mariadb:
    scale: 1
    start_on_create: true
  nextcloud:
    scale: 1
    start_on_create: true
  freshrss:
    scale: 1
    start_on_create: true
  ghost:
    scale: 1
    start_on_create: true