Added Zoneminder to docker for aya01

Changed naming for docker network so there is no compose_compose_net -> compose_net now

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
pull/1/head
TuDatTr 2022-12-05 18:25:36 +01:00
parent ca1b586ee5
commit f12dd2352c
4 changed files with 27 additions and 17 deletions

View File

@ -8,10 +8,11 @@
loop: loop:
- "{{ docker_dir }}/zm/" - "{{ docker_dir }}/zm/"
- name: Shut down docker # Todo, check if docker compose is running
shell: # - name: Shut down docker
cmd: "docker compose down --remove-orphans" # shell:
chdir: "{{ docker_compose_dir }}" # cmd: "docker compose down --remove-orphans"
# chdir: "{{ docker_compose_dir }}"
- name: Copy the compose file - name: Copy the compose file
template: template:

View File

@ -45,10 +45,11 @@
- "traefik/var-log/access.log" - "traefik/var-log/access.log"
- "traefik/var-log/traefik.log" - "traefik/var-log/traefik.log"
- name: Shut down docker # Todo, check if docker compose is running
shell: # - name: Shut down docker
cmd: "docker compose down --remove-orphans" # shell:
chdir: "{{ docker_compose_dir }}" # cmd: "docker compose down --remove-orphans"
# chdir: "{{ docker_compose_dir }}"
- name: Copy the compose file - name: Copy the compose file
template: template:

View File

@ -13,6 +13,9 @@ services:
- "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}" - "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}"
- "MYSQL_USER={{ mysql_user }}" - "MYSQL_USER={{ mysql_user }}"
- "MYSQL_PASSWORD={{ vault_mysql_user_password }}" - "MYSQL_PASSWORD={{ vault_mysql_user_password }}"
- "MAX_LOG_SIZE_BYTES=1000000"
- "MAX_LOG_NUMBER=20"
- "TZ=Europe/Berlin"
zoneminder: zoneminder:
image: ghcr.io/zoneminder-containers/zoneminder-base:latest image: ghcr.io/zoneminder-containers/zoneminder-base:latest
@ -24,7 +27,7 @@ services:
- 80:80 - 80:80
networks: networks:
- zoneminder - zoneminder
- compose_net - net
volumes: volumes:
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "{{ docker_dir }}/zm/data:/data" - "{{ docker_dir }}/zm/data:/data"
@ -35,12 +38,17 @@ services:
tmpfs: tmpfs:
size: 1000000000 size: 1000000000
environment: environment:
- MAX_LOG_SIZE_BYTES=1000000 - "MYSQL_DATABASE=zm"
- MAX_LOG_NUMBER=20 - "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: networks:
zoneminder: zoneminder:
compose_net: net:
driver: bridge driver: bridge
ipam: ipam:
driver: default driver: default

View File

@ -5,7 +5,7 @@ services:
image: traefik:latest image: traefik:latest
restart: unless-stopped restart: unless-stopped
networks: networks:
compose_net: {} net: {}
volumes: volumes:
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro"
@ -25,7 +25,7 @@ services:
image: "ghcr.io/qdm12/ddns-updater" image: "ghcr.io/qdm12/ddns-updater"
restart: unless-stopped restart: unless-stopped
networks: networks:
compose_net: {} net: {}
volumes: volumes:
- "{{ docker_dir }}/ddns-updater/data/:/updater/data/" - "{{ docker_dir }}/ddns-updater/data/:/updater/data/"
ports: ports:
@ -49,7 +49,7 @@ services:
image: pihole/pihole:latest image: pihole/pihole:latest
restart: unless-stopped restart: unless-stopped
networks: networks:
compose_net: {} net: {}
ports: ports:
- "53:53/tcp" - "53:53/tcp"
- "53:53/udp" - "53:53/udp"
@ -77,7 +77,7 @@ services:
- "traefik.http.services.pihole.loadbalancer.server.port=8089" - "traefik.http.services.pihole.loadbalancer.server.port=8089"
networks: networks:
compose_net: net:
driver: bridge driver: bridge
ipam: ipam:
driver: default driver: default