Hi,
I am testing setting up my self-hosted openHAB-Cloud in Docker with docker-compose.
I faced some issues with the docker-compose.yml at https://github.com/openhab/openhab-cloud/tree/master/deployment/docker
Mainly related to MongoDB
oh-mongodb | 14:39:33.76
oh-mongodb | 14:39:33.76 Welcome to the Bitnami mongodb container
oh-mongodb | 14:39:33.76 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-mongodb
oh-mongodb | 14:39:33.76 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-mongodb/issues
oh-mongodb | 14:39:33.76 Send us your feedback at containers@bitnami.com
oh-mongodb | 14:39:33.76
oh-mongodb |
oh-mongodb | 2019-10-11T14:39:33.781+0000 I STORAGE [main] Max cache overflow file size custom option: 0
oh-mongodb | 2019-10-11T14:39:33.784+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=26daf74b3748
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] db version v4.0.12
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] git version: 5776e3cbf9e7afe86e6b29e22520ffb6766e95d4
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] allocator: tcmalloc
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] modules: none
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] build environment:
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] distmod: debian92
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] distarch: x86_64
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] target_arch: x86_64
oh-mongodb | 2019-10-11T14:39:33.786+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true }, storage: { mmapv1: { smallFiles: true } } }
oh-mongodb | 2019-10-11T14:39:33.787+0000 I STORAGE [initandlisten] exception in initAndListen: IllegalOperation: Attempted to create a lock file on a read-only directory: /data/db, terminating
oh-mongodb | 2019-10-11T14:39:33.787+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
oh-mongodb | 2019-10-11T14:39:33.787+0000 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
oh-mongodb | 2019-10-11T14:39:33.787+0000 I CONTROL [initandlisten] now exiting
oh-mongodb | 2019-10-11T14:39:33.787+0000 I CONTROL [initandlisten] shutting down with code:100
I switched to the offical MongDB instead of bitnami and the following docker-compose.yml
version: '3'
services:
app-1:
container_name: oh-app-1
image: docker.io/openhab/openhabcloud-app
working_dir: /opt/openhabcloud
networks:
- proxy-tier
links:
- mongodb
- redis
ports:
- "3000"
depends_on:
- mongodb
- redis
restart: always
mongodb:
container_name: oh-mongodb
image: mongo:latest
ports:
- "27017:27017"
networks:
- proxy-tier
volumes:
- ./data/db:/data/db
- ./data/db:/data/configdb
restart: always
redis:
container_name: oh-redis
image: bitnami/redis:latest
networks:
- proxy-tier
ports:
- "6379"
environment:
- REDIS_PASSWORD=123_openHAB
restart: always
nginx:
container_name: oh-nginx
image: docker.io/openhab/openhabcloud-nginx
volumes:
- app-1:/opt/openhabcloud
networks:
- proxy-tier
ports:
- "8060:8081"
- "8443:8443"
links:
- app-1:app-1
volumes:
app-1:
networks:
proxy-tier:
external:
name: nginx-proxy
As you see, I have another network and different port mappings. The reason is that I have another nginx with TLS fronting Internet (not used yet).
When accessing http://host:8060 I see the login screen but all images, CSS, JS etc are not available (404)
Any idea why