Hi, I am trying to figure out how to get a static IP on my Nextcloud container in combination with a Zero trust tunnel from Cloudfare, attached to a subdomain.
Goal is to have nextcloud working locally (instead of external subdomain) by a DNS-rewrite in Adguard. Adguard only allows static 'normal' IP-numbers like 192.168.188.9 (without portnumbers). My Nextcloud container runs on OMV port 8080 but is automatically redirected to my subdomain. Inside my config.php for Nextcloud are the lines:
'overwrite.cli.url' => 'https://sub.example.nl',
'overwritehost' => 'sub.example.nl',
'overwriteprotocol' => 'https',
Typing my OMV-ip (like 192.168.188.11:8080) results in a redirect to sub.example.nl, that is logically but actually not wanted (keep data locally and faster).
My Nextcloud yml:
services:
nc:
image: nextcloud:apache
container_name: nextcloud
restart: always
ports:
- 8080:80
volumes:
- nc_data:/var/www/html
- $MUZIEK:/muziek
- $FOTOMAP:/fotomap
- $VIDEOS:/videos
networks:
- redisnet
- dbnet
environment:
- REDIS_HOST=redis
- MYSQL_HOST=db
- MYSQL_DATABASE=*
- MYSQL_USER=*
- MYSQL_PASSWORD=*
- PHP_OPCACHE_MEMORY_CONSUMPTION=256
- PHP_UPLOAD_LIMIT=1G
redis:
image: redis:alpine
container_name: redis
restart: always
networks:
- redisnet
expose:
- 6379
db:
image: mariadb:10.11
container_name: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db_data:/var/lib/mysql
networks:
- dbnet
environment:
- MYSQL_DATABASE=*
- MYSQL_USER=*
- MYSQL_ROOT_PASSWORD=*
- MYSQL_PASSWORD=*
expose:
- 3306
volumes:
db_data:
nc_data:
networks:
dbnet:
redisnet:
Display More
I have already created a macvlan in OMV which is operational for i.e. Adguard-container. "Subnet": "192.168.188.0/24", "IPRange": "192.168.188.6/32", "Gateway": "192.168.188.1". Is it possible to use this already created macvlan for Nextcloud? If yes - howto attach or combine?
I am doing something wrong (puzzling
) - how to combine networks under 'services'. Underneath works for another container:
It seems that you cannot simply combine lines starting with - networkname and networkname: under networks-services.
I hope I made myself clear and maybe somebody can point me to the right direction. Thx!