Somik's Home

Server admins cheat codes

Use the following docker compose file to host your own data in NextCloud host.

version: '2'

volumes:
  nextcloud:
    name: nextcloud_data
  db:
    name: nextcloud_db

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=MySQLROOTPassword
      - MYSQL_PASSWORD=mySecretPassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    hostname: example.com
    ports:
      - 8080:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=mySecretPassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - NEXTCLOUD_HOSTNAME=example.com

© Beli. All Rights Reserved.