this post was submitted on 01 Sep 2023
29 points (85.4% liked)

Privacy

31886 readers
652 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

Chat rooms

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS
top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago (1 children)

Was just struggling through this last weekend, thanks! Formatting is a little rough though, could you pastebin it?

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (2 children)
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

Is this better?

I still can link to paste bin if it isnt't

[–] [email protected] 1 points 1 year ago

Much, thanks!

[–] [email protected] 1 points 1 year ago (1 children)

Thx, will try yours next. I always experiment with some combinations, my preferred never worked. But yours looks closest to it. I always want proxy's out of the compose file but I would prefer postgresql over mariadb

[–] [email protected] 1 points 1 year ago

I read somewhere that Maria db is faster. I could be wrong though

[–] [email protected] 1 points 1 year ago (1 children)

hm i never used redis for Netxcloud.

[–] [email protected] 5 points 1 year ago

Probably should, it significantly decreased load times in my testing.

[–] [email protected] 1 points 1 year ago

Thank you. Maybe it could be improved by externalizing user credentials with docker secrets: https://docs.docker.com/compose/use-secrets/

I know it was meant quick and dirty. Just for anybody who uses the script as an approach for their self-hosting solution.