Here is a quick and dirty nextcloud docker-compose

3 years ago by Possibly linux to c/nextcloud

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - ./mysql:/var/lib/mysql
    environment:
      - MYSQL_PASSWORD=supersecretpassword
      - MYSQL_DATABASE=nextclouddb
      - MYSQL_USER=nextclouduser
      - MYSQL_RANDOM_ROOT_PASSWORD='yes'

  redis:

    image: redis

    restart: always

    command: redis-server --requirepass supersecretpassword2

  app:
    image: nextcloud:27
    restart: always
    ports:
      - 8080:80
    links:
      - db
      - redis
    volumes:
      - ./html:/var/www/html
    environment:
      - MYSQL_PASSWORD=supersecretpassword
      - MYSQL_DATABASE=nextclouddb
      - MYSQL_USER=nextclouduser
      - MYSQL_HOST=db
      - REDIS_HOST_PASSWORD=supersecretpassword2
    depends_on:
      - db
      - redis
  cron:
    image: nextcloud:27
    restart: always
    volumes:
      - ./html:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db

To use this you need docker-compose installed. Once thats installed create a nextcloud folder and copy in this file as docker-compose.yaml. Once you are in the working directory run docker-compose up -d

cron 3 points 3 years ago

This guide does not include the setup of a secure connection, e.g. with traefic and letsencrypt. This is recommended when the nextcloud instance is reachable from the internet.

path: 0 3026765, hotness: undefined, score: 3, children: 2
possiblylinux127 2 points 3 years ago

That was deliberate. You need to take more security precautions when exposing it to the internet. Firewalls and least privlage are a must

path: 0 3026765 3027175, hotness: undefined, score: 2, children: 0
Ddhuud 1 point 3 years ago

The title says quick and dirty. Besides, you can always keep this kind of thing behind some Nginx proxy like nginx-proxy-manager (and probably should)

path: 0 3026765 3028960, hotness: undefined, score: 1, children: 0
nextcloud
nextcloud

@discuss.tchncs.de

login for more options
420
20
1

A community for discussing all things related to Nextcloud.

Other resources:

go to feed...