Ok, I have just made it working in docker. In the end everything was fine with my config there was just some mess in the delta of the images. So I just removed all containters and images and redo them.
So some tutorial:
There is docker thread in the forum, with that can help you set it up, so now you should have and lxc container, attach to that container and
then install docker, docker-compose and you can use this docker-compose.yml config:
~ # cat docker-compose.yml
version: "3.5"
services:
nextcloud:
image: nextcloud
restart: always
build:
context: .
dockerfile: ./Dockerfile
ports:
- "8080:80"
environment:
- POSTGRES_HOST=db # HERE
- POSTGRES_DB=nextcloud
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=yourpass
depends_on:
- db
db:
image: postgres:latest
restart: always
hostname: 'db' # AND HERE
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
- POSTGRES_DB=nextcloud
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=yourpass
#--------------------------------
~ # cat Dockerfile
FROM nextcloud:production-apache
RUN apt-get update && apt-get install -y \
smbclient
#--------------------------------
then:
docker-compose build
docker-compose up -d
Thereafter restart your lxc container and it nextcloud should be working
I think the approach is better than the native nextcloud becaue
- you dont mess up your router
- everyting is well separated and
- can be redone easily, and
- it is uptodate to the latest version.
- you dont have to mess with lighthttpd, which less known and less supported