Ubuntu 18.04 Docker version 20.10.2 docker-compose version 1.27.4
The main problem here is that i have pretty little experience with dockers.
From this page I think I need to download and place the apps in /var/www/nextcloud/apps
, the thing is... that route as I understand is the one inside the docker.
I may be able to copy the files like this solution, but I want a cleaner version where I can keep editing and updating the apps.
In my .yml file I have one entry like this:
volumes:
- /data/ncweb:/var/www/html
I think I should add another entry to link that virtual path with a real one outside the docker.
2 issues here:
- I don't know which entry should be
- Not sure if I have to tell Nextcloud to look there and how, in my opinion there will be no need.
Maybe this?
volumes:
- /data/ncweb:/var/www/html
- /data/ncapps:/var/www/nextcloud/apps
I don't know either how to look for the path of apps
inside the docker, so that route may be totally wrong. I tried with a tool named dive but I'm using it in the wrong way.
Thanks in advance
..... EDIT .....
Here there is the full .yml file
version: "3.3"
networks:
web:
external: true
internal:
external: false
services:
nextcloud:
image: nextcloud:20
container_name: nextcloud-web
environment:
MYSQL_HOST: nextcloud-db:3306
MYSQL_DATABASE: nextdb
MYSQL_USER: nextuser
MYSQL_PASSWORD: abcdefghijklm
volumes:
- ./ncweb:/var/www/html
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.nc.rule=Host(`example.com`)"
- "traefik.http.routers.nc.entrypoints=websecure"
- "traefik.http.routers.nc.tls=true"
- "traefik.http.routers.nc.tls.certresolver=le"
- "traefik.http.routers.nc.middlewares=nc-header"
- "traefik.http.routers.nc.service=nextcloud"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
- "traefik.http.middlewares.nc-header.headers.referrerPolicy=no-referrer"
- "traefik.http.middlewares.nc-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.nc-header.headers.forceSTSHeader=true"
- "traefik.http.middlewares.nc-header.headers.stsPreload=true"
- "traefik.http.middlewares.nc-header.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.nc-header.headers.browserXssFilter=true"
- "traefik.http.middlewares.nc-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
networks:
- internal
- web
depends_on:
- nextcloud-db
- ooserver
logging:
options:
max-size: '1m'
max-file: '10'
driver: json-file
ooserver:
image: alehoho/oo-ce-docker-license
container_name: ooserver
environment:
# Uncomment strings below to enable the JSON Web Token validation.
- JWT_ENABLED=true
- JWT_SECRET=abcdefghijklm
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
networks:
- web
stdin_open: true
tty: true
restart: unless-stopped
volumes:
- ./oodata:/var/www/onlyoffice/Data
- ./oolib:/var/lib/onlyoffice
- ./oodb:/var/lib/postgresql
- ./oologs:/var/log/onlyoffice
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.oo.service=oo"
- "traefik.http.routers.oo.entrypoints=websecure"
- 'traefik.http.routers.oo.rule=Host("ooserver.example.com")'
- "traefik.http.routers.oo.tls=true"
- "traefik.http.routers.oo.tls.certresolver=le"
- "traefik.http.routers.oo.middlewares=oo-header"
- "traefik.http.services.oo.loadbalancer.server.port=80"
- "traefik.http.middlewares.oo-header.headers.referrerPolicy=no-referrer"
- "traefik.http.middlewares.oo-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.oo-header.headers.forceSTSHeader=true"
- "traefik.http.middlewares.oo-header.headers.stsPreload=true"
- "traefik.http.middlewares.oo-header.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.oo-header.headers.browserXssFilter=true"
- "traefik.http.middlewares.oo-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
logging:
options:
max-size: '1m'
max-file: '10'
driver: json-file
nextcloud-db:
image: mariadb:10
container_name: nextcloud-db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
MYSQL_ROOT_PASSWORD: abcdefghijklm
MYSQL_DATABASE: nextdb
MYSQL_USER: nextuser
MYSQL_PASSWORD: abcdefghijklm
volumes:
- nextdb-data:/var/lib/mysql
restart: unless-stopped
networks:
- internal
labels:
- "traefik.enable=false"
logging:
options:
max-size: '1m'
max-file: '10'
driver: json-file
adminer:
image: adminer
container_name: nextcloud-dbadmin
environment:
ADMINER_DEFAULT_SERVER: nextcloud-db
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.dbncadmin.rule=Host(`dbadmin.example.com`)"
- "traefik.http.routers.dbncadmin.entrypoints=websecure"
- "traefik.http.routers.dbncadmin.tls=true"
- "traefik.http.routers.dbncadmin.tls.certresolver=le"
- "traefik.http.routers.dbncadmin.service=dbncadmin"
- "traefik.http.routers.dbncadmin.middlewares=securelogin"
- "traefik.http.services.dbncadmin.loadbalancer.server.port=8080"
- "traefik.http.middlewares.securelogin.basicauth.users=xxxxxx:$$apr1$$abcdefghijklm$$abcdefghijklm"
networks:
- internal
- web
depends_on:
- nextcloud-db
volumes:
nextdb-data: