commit f9373a342fb6d39b45b01fc52948f9d758156c1d Author: stephane.david Date: Tue Feb 4 18:42:42 2025 +0100 First version of Docker-compose for Jeedom with mosquitto diff --git a/docker_compose.yml b/docker_compose.yml new file mode 100644 index 0000000..4a5aa21 --- /dev/null +++ b/docker_compose.yml @@ -0,0 +1,88 @@ +version: "3" + +services: + jeedom_db: + image: mariadb:latest + container_name: jeedom_db + command: + - "--default-authentication-plugin=mysql_native_password" + - "--skip-name-resolve" + - "--key_buffer_size=16M" + - "--thread_cache_size=16" + - "--tmp_table_size=48M" + - "--max_heap_table_size=48M" + - "--query_cache_type=1" + - "--query_cache_size=32M" + - "--query_cache_limit=2M" + - "--query_cache_min_res_unit=3K" + - "--innodb_flush_method=O_DIRECT" + - "--innodb_flush_log_at_trx_commit=2" + - "--innodb_log_file_size=32M" + - "--innodb_large_prefix=on" + - "--connect_timeout=600" + - "--wait_timeout=600" + - "--interactive_timeout=600" + volumes: + - /var/lib/docker/volumes/jeedom/mysql:/var/lib/mysql + restart: unless-stopped + environment: + - MYSQL_ROOT_PASSWORD=C@ptn&mo + - MYSQL_DATABASE=jeedom + - MYSQL_USER=jeedom + - MYSQL_PASSWORD=C@ptn&mo + expose: + - 3306 + networks: + - jeedom + + + mosquitto: + hostname: mqtt.local + container_name: mqtt + image: eclipse-mosquitto:latest + restart: unless-stopped + volumes: + - /var/lib/docker/volumes/mqtt/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro + - /var/lib/docker/volumes/mqtt/mosquitto.passwd:/mosquitto/config/mosquitto.passwd + - /var/lib/docker/volumes/mqtt/log/mosquitto.log:/mosquitto/log/mosquitto.log + - /var/lib/docker/volumes/mqtt/data:/mosquitto/data + ports: + - 1883:1883 + - 8883:8883 + - 9001:9001 + networks: + - jeedom + + jeedom: + hostname: jeedom.local + container_name: jeedom + image: jeedom/jeedom:4.4-http-bookworm + devices: + - "/dev/ttyUSB0:/dev/ttyUSB0" + # - "/dev/ttyUSB1:/dev/ttyUSB1" + restart: unless-stopped + volumes: + - /var/lib/docker/volumes/jeedom/datas:/var/www/html + tmpfs: + - /tmp/jeedom + ports: + - 52080:80 + environment: + - DB_HOST=jeedom_db + - DB_USERNAME=jeedom + - DB_PASSWORD=C@ptn&mo + - DB_NAME=jeedom + healthcheck: + test: [ "CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:80" ] + interval: 30s + timeout: 10s + retries: 5 + depends_on: + - jeedom_db + networks: + - jeedom + +networks: + jeedom: + name: jeedom + driver: bridge \ No newline at end of file