diff --git a/roles/docker/tasks/aya01_compose.yml b/roles/docker/tasks/aya01_compose.yml index 00f3da1..0aa31b6 100644 --- a/roles/docker/tasks/aya01_compose.yml +++ b/roles/docker/tasks/aya01_compose.yml @@ -8,11 +8,12 @@ loop: - "{{ docker_dir }}/zm/" -- name: Shut down docker - shell: - cmd: "docker compose down --remove-orphans" - chdir: "{{ docker_compose_dir }}" - +# Todo, check if docker compose is running +# - name: Shut down docker +# shell: +# cmd: "docker compose down --remove-orphans" +# chdir: "{{ docker_compose_dir }}" + - name: Copy the compose file template: src: templates/aya01/compose.yaml diff --git a/roles/docker/tasks/pi_compose.yml b/roles/docker/tasks/pi_compose.yml index b410c3a..10cc666 100644 --- a/roles/docker/tasks/pi_compose.yml +++ b/roles/docker/tasks/pi_compose.yml @@ -45,10 +45,11 @@ - "traefik/var-log/access.log" - "traefik/var-log/traefik.log" -- name: Shut down docker - shell: - cmd: "docker compose down --remove-orphans" - chdir: "{{ docker_compose_dir }}" +# Todo, check if docker compose is running +# - name: Shut down docker +# shell: +# cmd: "docker compose down --remove-orphans" +# chdir: "{{ docker_compose_dir }}" - name: Copy the compose file template: diff --git a/roles/docker/templates/aya01/compose.yaml b/roles/docker/templates/aya01/compose.yaml index c991d7d..b7457c6 100644 --- a/roles/docker/templates/aya01/compose.yaml +++ b/roles/docker/templates/aya01/compose.yaml @@ -13,6 +13,9 @@ services: - "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}" - "MYSQL_USER={{ mysql_user }}" - "MYSQL_PASSWORD={{ vault_mysql_user_password }}" + - "MAX_LOG_SIZE_BYTES=1000000" + - "MAX_LOG_NUMBER=20" + - "TZ=Europe/Berlin" zoneminder: image: ghcr.io/zoneminder-containers/zoneminder-base:latest @@ -24,7 +27,7 @@ services: - 80:80 networks: - zoneminder - - compose_net + - net volumes: - "/etc/localtime:/etc/localtime:ro" - "{{ docker_dir }}/zm/data:/data" @@ -35,12 +38,17 @@ services: tmpfs: size: 1000000000 environment: - - MAX_LOG_SIZE_BYTES=1000000 - - MAX_LOG_NUMBER=20 + - "MYSQL_DATABASE=zm" + - "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}" + - "MYSQL_USER={{ mysql_user }}" + - "MYSQL_PASSWORD={{ vault_mysql_user_password }}" + - "MAX_LOG_SIZE_BYTES=1000000" + - "MAX_LOG_NUMBER=20" + - "TZ=Europe/Berlin" networks: zoneminder: - compose_net: + net: driver: bridge ipam: driver: default diff --git a/roles/docker/templates/pi/compose.yaml b/roles/docker/templates/pi/compose.yaml index 735a785..084fe7e 100644 --- a/roles/docker/templates/pi/compose.yaml +++ b/roles/docker/templates/pi/compose.yaml @@ -5,7 +5,7 @@ services: image: traefik:latest restart: unless-stopped networks: - compose_net: {} + net: {} volumes: - "/etc/localtime:/etc/localtime:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro" @@ -25,7 +25,7 @@ services: image: "ghcr.io/qdm12/ddns-updater" restart: unless-stopped networks: - compose_net: {} + net: {} volumes: - "{{ docker_dir }}/ddns-updater/data/:/updater/data/" ports: @@ -49,7 +49,7 @@ services: image: pihole/pihole:latest restart: unless-stopped networks: - compose_net: {} + net: {} ports: - "53:53/tcp" - "53:53/udp" @@ -77,7 +77,7 @@ services: - "traefik.http.services.pihole.loadbalancer.server.port=8089" networks: - compose_net: + net: driver: bridge ipam: driver: default