├── .husky ├── .gitignore └── commit-msg ├── .gitignore ├── .github └── FUNDING.yml ├── beta ├── Dockerfile ├── icon.png ├── CHANGELOG.md ├── README.md └── config.json ├── stable ├── Dockerfile ├── icon.png ├── CHANGELOG.md ├── README.md └── config.json ├── proxy ├── CHANGELOG.md ├── icon.png ├── rootfs │ └── etc │ │ ├── nginx │ │ ├── templates │ │ │ ├── upstream.gtpl │ │ │ └── ingress.gtpl │ │ ├── servers │ │ │ └── .gitkeep │ │ ├── includes │ │ │ ├── server_params.conf │ │ │ ├── ssl_params.conf │ │ │ ├── proxy_params.conf │ │ │ └── mime.types │ │ └── nginx.conf │ │ ├── services.d │ │ └── nginx │ │ │ ├── run │ │ │ └── finish │ │ └── cont-init.d │ │ └── nginx.sh ├── Dockerfile ├── config.json └── README.md ├── deepstack ├── Dockerfile ├── icon.png ├── CHANGELOG.md ├── build.json ├── README.md └── config.json ├── deepstack-cpu ├── Dockerfile ├── build.json ├── icon.png ├── CHANGELOG.md ├── README.md └── config.json ├── facebox ├── icon.png ├── Dockerfile ├── run.sh ├── README.md └── config.json ├── compreface ├── icon.png ├── CHANGELOG.md ├── Dockerfile ├── README.md ├── run.sh ├── config.json └── postgresql.conf ├── repository.json ├── .commitlintrc.js ├── package.json └── README.md /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: jakowenko 2 | -------------------------------------------------------------------------------- /beta/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jakowenko/double-take:beta -------------------------------------------------------------------------------- /stable/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jakowenko/double-take:1.13.1 -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npx --no-install commitlint --edit $1 -------------------------------------------------------------------------------- /proxy/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 1.0.0 2 | 3 | - initial release 4 | -------------------------------------------------------------------------------- /deepstack/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV DATA_DIR=/data/database -------------------------------------------------------------------------------- /deepstack-cpu/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | FROM $BUILD_FROM 3 | ENV DATA_DIR=/data/database -------------------------------------------------------------------------------- /beta/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/beta/icon.png -------------------------------------------------------------------------------- /facebox/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/facebox/icon.png -------------------------------------------------------------------------------- /proxy/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/proxy/icon.png -------------------------------------------------------------------------------- /stable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/stable/icon.png -------------------------------------------------------------------------------- /deepstack-cpu/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "build_from": { 3 | "amd64": "deepquestai/deepstack:cpu" 4 | } 5 | } -------------------------------------------------------------------------------- /deepstack/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/deepstack/icon.png -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/templates/upstream.gtpl: -------------------------------------------------------------------------------- 1 | upstream backend { 2 | server {{ .server }}; 3 | } 4 | -------------------------------------------------------------------------------- /compreface/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/compreface/icon.png -------------------------------------------------------------------------------- /deepstack-cpu/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakowenko/double-take-hassio-addons/HEAD/deepstack-cpu/icon.png -------------------------------------------------------------------------------- /facebox/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM machinebox/facebox 2 | RUN apt-get install jq -y 3 | COPY run.sh / 4 | ENTRYPOINT ["/run.sh"] -------------------------------------------------------------------------------- /beta/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please reference the [beta commits](https://github.com/jakowenko/double-take/commits/beta) for changes. 2 | -------------------------------------------------------------------------------- /compreface/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please reference the [release notes](https://github.com/exadel-inc/CompreFace/releases) for changes. 2 | -------------------------------------------------------------------------------- /deepstack/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please reference the [release notes](https://github.com/johnolafenwa/DeepStack/releases) for changes. 2 | -------------------------------------------------------------------------------- /stable/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please reference the [release notes](https://github.com/jakowenko/double-take/releases) for changes. 2 | -------------------------------------------------------------------------------- /deepstack-cpu/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please reference the [release notes](https://github.com/johnolafenwa/DeepStack/releases) for changes. 2 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/servers/.gitkeep: -------------------------------------------------------------------------------- 1 | Without requirements or design, programming is the art of adding bugs to an empty text file. (Louis Srygley) 2 | -------------------------------------------------------------------------------- /repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Double Take Hass.io Add-ons", 3 | "url": "https://github.com/jakowenko/double-take-hassio-addons", 4 | "maintainer": "jakowenko" 5 | } 6 | -------------------------------------------------------------------------------- /deepstack-cpu/README.md: -------------------------------------------------------------------------------- 1 | ![amd64]amd64-shield 2 | 3 | # DeepStack (CPU) 4 | 5 | [Documentation](https://docs.deepstack.cc) 6 | 7 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 8 | -------------------------------------------------------------------------------- /facebox/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | values=`cat /data/options.json` 3 | for s in $(echo $values | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" ); do 4 | export $s 5 | done 6 | /app/facebox -------------------------------------------------------------------------------- /deepstack/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "build_from": { 3 | "amd64": "deepquestai/deepstack:latest", 4 | "aarch64": "deepquestai/deepstack:arm64", 5 | "armv7": "deepquestai/deepstack:arm64" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/includes/server_params.conf: -------------------------------------------------------------------------------- 1 | root /dev/null; 2 | server_name $hostname; 3 | 4 | add_header X-Content-Type-Options nosniff; 5 | add_header X-XSS-Protection "1; mode=block"; 6 | add_header X-Robots-Tag none; 7 | -------------------------------------------------------------------------------- /compreface/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM exadel/compreface:1.1.0 2 | ENV PGDATA=/data/database 3 | RUN apt-get update && apt-get install jq -y && rm -rf /var/lib/apt/lists/* 4 | COPY postgresql.conf /etc/postgresql/13/main/postgresql.conf 5 | COPY run.sh / 6 | CMD ["/run.sh"] 7 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/services.d/nginx/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Runs the NGINX daemon 4 | # ============================================================================== 5 | 6 | bashio::log.info "Starting NGINX..." 7 | exec nginx 8 | -------------------------------------------------------------------------------- /compreface/README.md: -------------------------------------------------------------------------------- 1 | # Exadel CompreFace 2 | 3 | This add-on runs the [single container](https://github.com/exadel-inc/CompreFace/issues/651) version of CompreFace. 4 | 5 | CompreFace will be exposed on port 8000 - you can change this in the add-on configuration if another port is required. 6 | 7 | [Documentation](https://github.com/exadel-inc/CompreFace#readme) 8 | -------------------------------------------------------------------------------- /deepstack/README.md: -------------------------------------------------------------------------------- 1 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] 2 | 3 | # DeepStack 4 | 5 | [Documentation](https://docs.deepstack.cc) 6 | 7 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 8 | [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg 9 | [armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg 10 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/services.d/nginx/finish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/execlineb -S0 2 | # ============================================================================== 3 | # Take down the S6 supervision tree when NGINX fails 4 | # ============================================================================== 5 | if -n { s6-test $# -ne 0 } 6 | if -n { s6-test ${1} -eq 256 } 7 | 8 | s6-svscanctl -t /var/run/s6/services 9 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/templates/ingress.gtpl: -------------------------------------------------------------------------------- 1 | server { 2 | listen 3000 default_server; 3 | 4 | include /etc/nginx/includes/server_params.conf; 5 | 6 | location / { 7 | allow 172.30.32.2; 8 | deny all; 9 | 10 | proxy_pass http://backend; 11 | proxy_set_header X-Ingress-Path {{ .entry }}; 12 | include /etc/nginx/includes/proxy_params.conf; 13 | } 14 | } -------------------------------------------------------------------------------- /facebox/README.md: -------------------------------------------------------------------------------- 1 | ![amd64][amd64-shield] 2 | 3 | # Facebox 4 | 5 | To use this add-on create a Veritone Developer account and login at: 6 | https://machinebox.io/login 7 | 8 | Click on the Machine Box navigation link to view your `MB_KEY`. 9 | 10 | Enter your `MB_KEY` into the configuration of the add-on. 11 | 12 | [Documentation](https://machinebox.io/docs/facebox) 13 | 14 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 15 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/includes/ssl_params.conf: -------------------------------------------------------------------------------- 1 | ssl_protocols TLSv1.2 TLSv1.3; 2 | ssl_prefer_server_ciphers off; 3 | ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; 4 | ssl_session_timeout 10m; 5 | ssl_session_cache shared:SSL:10m; 6 | ssl_session_tickets off; 7 | ssl_stapling on; 8 | ssl_stapling_verify on; 9 | -------------------------------------------------------------------------------- /facebox/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Facebox", 3 | "version": "1a1358d", 4 | "url": "https://machinebox.io/docs/facebox", 5 | "slug": "facebox", 6 | "description": "Facial recognition with one-shot teaching", 7 | "arch": ["amd64"], 8 | "startup": "application", 9 | "boot": "auto", 10 | "ports": { 11 | "8080/tcp": 8000 12 | }, 13 | "ports_description": { 14 | "8080/tcp": "UI/API" 15 | }, 16 | "options": { 17 | "MB_KEY": "" 18 | }, 19 | "schema": { 20 | "MB_KEY": "str" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.commitlintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'type-enum': [ 5 | 2, 6 | 'always', 7 | [ 8 | 'build', 9 | 'chore', 10 | 'ci', 11 | 'docs', 12 | 'feat', 13 | 'fix', 14 | 'perf', 15 | 'refactor', 16 | 'revert', 17 | 'style', 18 | 'test', 19 | 'wip', 20 | ], 21 | ], 22 | 'footer-max-line-length': [0, 'always'], 23 | 'body-max-line-length': [0, 'always'], 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /deepstack-cpu/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DeepStack (CPU)", 3 | "version": "2021.09.1", 4 | "url": "https://github.com/johnolafenwa/DeepStack", 5 | "slug": "deepstack-cpu", 6 | "description": "The World's Leading Cross Platform AI Engine for Edge Devices", 7 | "arch": ["amd64"], 8 | "startup": "application", 9 | "boot": "auto", 10 | "ports": { 11 | "5000/tcp": 5001 12 | }, 13 | "ports_description": { 14 | "5000/tcp": "API" 15 | }, 16 | "environment": { 17 | "VISION-FACE": "True", 18 | "VISION-DETECTION": "True" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /deepstack/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DeepStack", 3 | "version": "2021.09.1", 4 | "url": "https://github.com/johnolafenwa/DeepStack", 5 | "slug": "deepstack", 6 | "description": "The World's Leading Cross Platform AI Engine for Edge Devices", 7 | "arch": ["amd64", "armv7", "aarch64"], 8 | "startup": "application", 9 | "boot": "auto", 10 | "ports": { 11 | "5000/tcp": 5001 12 | }, 13 | "ports_description": { 14 | "5000/tcp": "API" 15 | }, 16 | "environment": { 17 | "VISION-FACE": "True", 18 | "VISION-DETECTION": "True" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_ARCH 2 | # hadolint ignore=DL3006 3 | FROM ghcr.io/hassio-addons/debian-base/${BUILD_ARCH}:5.1.1 4 | 5 | # Set shell 6 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 7 | 8 | # Setup base 9 | # hadolint ignore=DL3003 10 | RUN apt-get -qq update \ 11 | && apt-get -qq install --no-install-recommends -y nginx \ 12 | && (apt-get autoremove -y; apt-get autoclean -y) 13 | 14 | # Copy root filesystem 15 | COPY rootfs / 16 | 17 | ARG BUILD_ARCH 18 | ARG BUILD_DATE 19 | ARG BUILD_DESCRIPTION 20 | ARG BUILD_NAME 21 | ARG BUILD_REF 22 | ARG BUILD_REPOSITORY 23 | ARG BUILD_VERSION -------------------------------------------------------------------------------- /proxy/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Double Take Proxy", 3 | "version": "1.0.0", 4 | "url": "https://github.com/jakowenko/double-take", 5 | "panel_icon": "mdi:face-recognition", 6 | "slug": "double-take-proxy", 7 | "description": "Unified UI and API for processing and training images for facial recognition", 8 | "arch": ["aarch64", "amd64", "armhf", "armv7", "i386"], 9 | "startup": "application", 10 | "boot": "auto", 11 | "ingress": true, 12 | "ingress_port": 3000, 13 | "panel_admin": false, 14 | "options": { 15 | "server": "double-take.local:3000" 16 | }, 17 | "schema": { 18 | "server": "match(^.+:\\d+$)" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/includes/proxy_params.conf: -------------------------------------------------------------------------------- 1 | proxy_http_version 1.1; 2 | proxy_ignore_client_abort off; 3 | proxy_read_timeout 86400s; 4 | proxy_redirect off; 5 | proxy_send_timeout 86400s; 6 | proxy_max_temp_file_size 0; 7 | 8 | proxy_set_header Accept-Encoding ""; 9 | proxy_set_header Connection $connection_upgrade; 10 | proxy_set_header Host $http_host; 11 | proxy_set_header Upgrade $http_upgrade; 12 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 13 | proxy_set_header X-Forwarded-Proto $scheme; 14 | proxy_set_header X-NginX-Proxy true; 15 | proxy_set_header X-Real-IP $remote_addr; 16 | 17 | 18 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/cont-init.d/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Configures NGINX for use with this add-on. 4 | # ============================================================================== 5 | declare server 6 | 7 | bashio::var.json \ 8 | entry "$(bashio::addon.ingress_entry)" \ 9 | | tempio \ 10 | -template /etc/nginx/templates/ingress.gtpl \ 11 | -out /etc/nginx/servers/ingress.conf 12 | 13 | server=$(bashio::config 'server') 14 | 15 | echo '{"server":"'"$server"'"}' \ 16 | | tempio \ 17 | -template /etc/nginx/templates/upstream.gtpl \ 18 | -out /etc/nginx/includes/upstream.conf 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "double-take-hassio-addons", 3 | "version": "1.0.0", 4 | "description": "Double Take Hass.io Add-ons", 5 | "scripts": { 6 | "prepare": "husky install" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/jakowenko/double-take-hassio-addons.git" 11 | }, 12 | "keywords": [], 13 | "author": "David Jakowenko", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/jakowenko/double-take-hassio-addons/issues" 17 | }, 18 | "homepage": "https://github.com/jakowenko/double-take-hassio-addons#readme", 19 | "devDependencies": { 20 | "@commitlint/cli": "^13.2.1", 21 | "@commitlint/config-conventional": "^13.2.0", 22 | "husky": "^7.0.4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /beta/README.md: -------------------------------------------------------------------------------- 1 | [![Double Take](https://badgen.net/github/release/jakowenko/double-take/stable)](https://github.com/jakowenko/double-take) [![Double Take](https://badgen.net/github/stars/jakowenko/double-take)](https://github.com/jakowenko/double-take/stargazers) [![Docker Pulls](https://flat.badgen.net/docker/pulls/jakowenko/double-take)](https://hub.docker.com/r/jakowenko/double-take) [![Discord](https://flat.badgen.net/discord/members/3pumsskdN5?label=Discord)](https://discord.gg/3pumsskdN5) 2 | 3 | ![amd64][amd64-shield] 4 | 5 | # Double Take 6 | 7 | Unified UI and API for processing and training images for facial recognition. 8 | 9 | [Documentation](https://github.com/jakowenko/double-take/tree/beta#readme) 10 | 11 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 12 | -------------------------------------------------------------------------------- /compreface/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Entrypoint 4 | # 5 | # Ensure persistent data is stored in /data/ and then start the stack 6 | 7 | set -euo pipefail 8 | 9 | start() { 10 | echo "Starting CompreFace" >&2 11 | values=$(cat /data/options.json) 12 | for s in $(echo "$values" | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" ); do 13 | export "${s?}" 14 | done 15 | 16 | if [ "$PGDATA" == "/data/database" ] && [ -d /data ] 17 | then 18 | if [ ! -d /data/database ] 19 | then 20 | cp -rp /var/lib/postgresql/data /data/database 21 | fi 22 | fi 23 | 24 | chown -R postgres:postgres "$PGDATA" 25 | 26 | exec /usr/bin/supervisord 27 | } 28 | 29 | 30 | if grep -q avx /proc/cpuinfo 31 | then 32 | start 33 | else 34 | echo "AVX not detected" >&2 35 | exit 1 36 | fi 37 | -------------------------------------------------------------------------------- /compreface/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Exadel CompreFace", 3 | "version": "1.1.0", 4 | "url": "https://github.com/exadel-inc/CompreFace", 5 | "slug": "compreface", 6 | "description": "Exadel CompreFace is a leading free and open-source face recognition system", 7 | "arch": ["amd64"], 8 | "startup": "application", 9 | "boot": "auto", 10 | "ports": { 11 | "80/tcp": 8000 12 | }, 13 | "ports_description": { 14 | "80/tcp": "UI/API" 15 | }, 16 | "options": { 17 | "POSTGRES_URL": "jdbc:postgresql://localhost:5432/frs", 18 | "POSTGRES_USER": "compreface", 19 | "POSTGRES_PASSWORD": "M7yfTsBscdqvZs49", 20 | "POSTGRES_DB": "frs", 21 | "API_JAVA_OPTS": "-Xmx1g" 22 | }, 23 | "schema": { 24 | "POSTGRES_URL": "str", 25 | "POSTGRES_USER": "str", 26 | "POSTGRES_PASSWORD": "str", 27 | "POSTGRES_DB": "str", 28 | "API_JAVA_OPTS": "str" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /stable/README.md: -------------------------------------------------------------------------------- 1 | [![Double Take](https://badgen.net/github/release/jakowenko/double-take/stable)](https://github.com/jakowenko/double-take) [![Double Take](https://badgen.net/github/stars/jakowenko/double-take)](https://github.com/jakowenko/double-take/stargazers) [![Docker Pulls](https://flat.badgen.net/docker/pulls/jakowenko/double-take)](https://hub.docker.com/r/jakowenko/double-take) [![Discord](https://flat.badgen.net/discord/members/3pumsskdN5?label=Discord)](https://discord.gg/3pumsskdN5) 2 | 3 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] 4 | 5 | # Double Take 6 | 7 | Unified UI and API for processing and training images for facial recognition. 8 | 9 | [Documentation](https://github.com/jakowenko/double-take#readme) 10 | 11 | [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg 12 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 13 | [armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg 14 | -------------------------------------------------------------------------------- /beta/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Double Take (beta)", 3 | "version": "1.13.1", 4 | "url": "https://github.com/jakowenko/double-take", 5 | "panel_icon": "mdi:face-recognition", 6 | "slug": "double-take-beta", 7 | "description": "Unified UI and API for processing and training images for facial recognition", 8 | "arch": ["amd64"], 9 | "startup": "application", 10 | "boot": "auto", 11 | "ingress": true, 12 | "ingress_port": 3000, 13 | "ports": { 14 | "3000/tcp": 3000 15 | }, 16 | "ports_description": { 17 | "3000/tcp": "Web interface (not required for Home Assistant ingress)" 18 | }, 19 | "map": ["media:rw", "config:rw"], 20 | "environment": { 21 | "HA_ADDON": "true" 22 | }, 23 | "options": { 24 | "STORAGE_PATH": "/config/double-take", 25 | "CONFIG_PATH": "/config/double-take", 26 | "SECRETS_PATH": "/config", 27 | "MEDIA_PATH": "/media/double-take" 28 | }, 29 | "schema": { 30 | "STORAGE_PATH": "str", 31 | "CONFIG_PATH": "str", 32 | "SECRETS_PATH": "str", 33 | "MEDIA_PATH": "str" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /stable/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Double Take", 3 | "version": "1.13.1", 4 | "url": "https://github.com/jakowenko/double-take", 5 | "panel_icon": "mdi:face-recognition", 6 | "slug": "double-take", 7 | "description": "Unified UI and API for processing and training images for facial recognition", 8 | "arch": ["armv7", "aarch64", "amd64"], 9 | "startup": "application", 10 | "boot": "auto", 11 | "ingress": true, 12 | "ingress_port": 3000, 13 | "ports": { 14 | "3000/tcp": 3000 15 | }, 16 | "ports_description": { 17 | "3000/tcp": "Web interface (not required for Home Assistant ingress)" 18 | }, 19 | "map": ["media:rw", "config:rw"], 20 | "environment": { 21 | "HA_ADDON": "true" 22 | }, 23 | "options": { 24 | "STORAGE_PATH": "/config/double-take", 25 | "CONFIG_PATH": "/config/double-take", 26 | "SECRETS_PATH": "/config", 27 | "MEDIA_PATH": "/media/double-take" 28 | }, 29 | "schema": { 30 | "STORAGE_PATH": "str", 31 | "CONFIG_PATH": "str", 32 | "SECRETS_PATH": "str", 33 | "MEDIA_PATH": "str" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | # Run nginx in foreground. 2 | daemon off; 3 | 4 | # This is run inside Docker. 5 | user root; 6 | 7 | # Pid storage location. 8 | pid /var/run/nginx.pid; 9 | 10 | # Set number of worker processes. 11 | worker_processes 1; 12 | 13 | # Enables the use of JIT for regular expressions to speed-up their processing. 14 | pcre_jit on; 15 | 16 | # Write error log to the add-on log. 17 | error_log /proc/1/fd/1 error; 18 | 19 | # Max num of simultaneous connections by a worker process. 20 | events { 21 | worker_connections 512; 22 | } 23 | 24 | http { 25 | include /etc/nginx/includes/mime.types; 26 | 27 | access_log off; 28 | client_max_body_size 4G; 29 | default_type application/octet-stream; 30 | gzip on; 31 | keepalive_timeout 65; 32 | sendfile on; 33 | server_tokens off; 34 | tcp_nodelay on; 35 | tcp_nopush on; 36 | 37 | map $http_upgrade $connection_upgrade { 38 | default upgrade; 39 | '' close; 40 | } 41 | 42 | include /etc/nginx/includes/upstream.conf; 43 | include /etc/nginx/servers/*.conf; 44 | } 45 | -------------------------------------------------------------------------------- /proxy/README.md: -------------------------------------------------------------------------------- 1 | [![Double Take](https://badgen.net/github/release/jakowenko/double-take/stable)](https://github.com/jakowenko/double-take) [![Double Take](https://badgen.net/github/stars/jakowenko/double-take)](https://github.com/jakowenko/double-take/stargazers) [![Docker Pulls](https://flat.badgen.net/docker/pulls/jakowenko/double-take)](https://hub.docker.com/r/jakowenko/double-take) [![Discord](https://flat.badgen.net/discord/members/3pumsskdN5?label=Discord)](https://discord.gg/3pumsskdN5) 2 | 3 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] ![armhf][armhf-shield] ![i386][i386-shield] 4 | 5 | # Double Take 6 | 7 | Unified UI and API for processing and training images for facial recognition. 8 | 9 | [Documentation](https://github.com/jakowenko/double-take/tree/beta#readme) 10 | 11 | --- 12 | 13 | This add-on creates a proxy to a Double Take instance running separately from Home Assistant. 14 | 15 | _Note: this add-on does not run Double Take itself._ 16 | 17 | [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg 18 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 19 | [armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg 20 | [armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg 21 | [i386-shield]: https://img.shields.io/badge/i386-yes-green.svg 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Double Take Hass.io Add-ons 2 | 3 | [![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fjakowenko%2Fdouble-take-hassio-addons) 4 | 5 | ## Double Take Add-ons 6 | 7 | ### [Stable](./stable) 8 | 9 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] 10 | 11 | ### [Beta](./beta) 12 | 13 | ![amd64][amd64-shield] 14 | 15 | ### [Proxy](./proxy) 16 | 17 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] ![armhf][armhf-shield] ![i386][i386-shield] 18 | 19 | ## Detector Add-ons 20 | 21 | ### [CompreFace](./compreface) 22 | 23 | ![amd64][amd64-shield] 24 | 25 | ### [DeepStack](./deepstack) 26 | 27 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] 28 | 29 | ### [DeepStack CPU](./deepstack-cpu) 30 | 31 | ![amd64][amd64-shield] ![armv7][armv7-shield] ![aarch64][aarch64-shield] 32 | 33 | ### [Facebox](./facebox) 34 | 35 | ![amd64][amd64-shield] 36 | 37 | [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg 38 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 39 | [armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg 40 | [armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg 41 | [i386-shield]: https://img.shields.io/badge/i386-yes-green.svg 42 | -------------------------------------------------------------------------------- /proxy/rootfs/etc/nginx/includes/mime.types: -------------------------------------------------------------------------------- 1 | types { 2 | text/html html htm shtml; 3 | text/css css; 4 | text/xml xml; 5 | image/gif gif; 6 | image/jpeg jpeg jpg; 7 | application/javascript js; 8 | application/atom+xml atom; 9 | application/rss+xml rss; 10 | 11 | text/mathml mml; 12 | text/plain txt; 13 | text/vnd.sun.j2me.app-descriptor jad; 14 | text/vnd.wap.wml wml; 15 | text/x-component htc; 16 | 17 | image/png png; 18 | image/svg+xml svg svgz; 19 | image/tiff tif tiff; 20 | image/vnd.wap.wbmp wbmp; 21 | image/webp webp; 22 | image/x-icon ico; 23 | image/x-jng jng; 24 | image/x-ms-bmp bmp; 25 | 26 | font/woff woff; 27 | font/woff2 woff2; 28 | 29 | application/java-archive jar war ear; 30 | application/json json; 31 | application/mac-binhex40 hqx; 32 | application/msword doc; 33 | application/pdf pdf; 34 | application/postscript ps eps ai; 35 | application/rtf rtf; 36 | application/vnd.apple.mpegurl m3u8; 37 | application/vnd.google-earth.kml+xml kml; 38 | application/vnd.google-earth.kmz kmz; 39 | application/vnd.ms-excel xls; 40 | application/vnd.ms-fontobject eot; 41 | application/vnd.ms-powerpoint ppt; 42 | application/vnd.oasis.opendocument.graphics odg; 43 | application/vnd.oasis.opendocument.presentation odp; 44 | application/vnd.oasis.opendocument.spreadsheet ods; 45 | application/vnd.oasis.opendocument.text odt; 46 | application/vnd.openxmlformats-officedocument.presentationml.presentation 47 | pptx; 48 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 49 | xlsx; 50 | application/vnd.openxmlformats-officedocument.wordprocessingml.document 51 | docx; 52 | application/vnd.wap.wmlc wmlc; 53 | application/x-7z-compressed 7z; 54 | application/x-cocoa cco; 55 | application/x-java-archive-diff jardiff; 56 | application/x-java-jnlp-file jnlp; 57 | application/x-makeself run; 58 | application/x-perl pl pm; 59 | application/x-pilot prc pdb; 60 | application/x-rar-compressed rar; 61 | application/x-redhat-package-manager rpm; 62 | application/x-sea sea; 63 | application/x-shockwave-flash swf; 64 | application/x-stuffit sit; 65 | application/x-tcl tcl tk; 66 | application/x-x509-ca-cert der pem crt; 67 | application/x-xpinstall xpi; 68 | application/xhtml+xml xhtml; 69 | application/xspf+xml xspf; 70 | application/zip zip; 71 | 72 | application/octet-stream bin exe dll; 73 | application/octet-stream deb; 74 | application/octet-stream dmg; 75 | application/octet-stream iso img; 76 | application/octet-stream msi msp msm; 77 | 78 | audio/midi mid midi kar; 79 | audio/mpeg mp3; 80 | audio/ogg ogg; 81 | audio/x-m4a m4a; 82 | audio/x-realaudio ra; 83 | 84 | video/3gpp 3gpp 3gp; 85 | video/mp2t ts; 86 | video/mp4 mp4; 87 | video/mpeg mpeg mpg; 88 | video/quicktime mov; 89 | video/webm webm; 90 | video/x-flv flv; 91 | video/x-m4v m4v; 92 | video/x-mng mng; 93 | video/x-ms-asf asx asf; 94 | video/x-ms-wmv wmv; 95 | video/x-msvideo avi; 96 | } 97 | -------------------------------------------------------------------------------- /compreface/postgresql.conf: -------------------------------------------------------------------------------- 1 | # CompreFace changes: 2 | # 1. Changed `data_directory`, so it will always link to `/var/lib/postgresql/data` and do not depend on postgres version. 3 | 4 | # ----------------------------- 5 | # PostgreSQL configuration file 6 | # ----------------------------- 7 | # 8 | # This file consists of lines of the form: 9 | # 10 | # name = value 11 | # 12 | # (The "=" is optional.) Whitespace may be used. Comments are introduced with 13 | # "#" anywhere on a line. The complete list of parameter names and allowed 14 | # values can be found in the PostgreSQL documentation. 15 | # 16 | # The commented-out settings shown in this file represent the default values. 17 | # Re-commenting a setting is NOT sufficient to revert it to the default value; 18 | # you need to reload the server. 19 | # 20 | # This file is read on server startup and when the server receives a SIGHUP 21 | # signal. If you edit the file on a running system, you have to SIGHUP the 22 | # server for the changes to take effect, run "pg_ctl reload", or execute 23 | # "SELECT pg_reload_conf()". Some parameters, which are marked below, 24 | # require a server shutdown and restart to take effect. 25 | # 26 | # Any parameter can also be given as a command-line option to the server, e.g., 27 | # "postgres -c log_connections=on". Some parameters can be changed at run time 28 | # with the "SET" SQL command. 29 | # 30 | # Memory units: B = bytes Time units: us = microseconds 31 | # kB = kilobytes ms = milliseconds 32 | # MB = megabytes s = seconds 33 | # GB = gigabytes min = minutes 34 | # TB = terabytes h = hours 35 | # d = days 36 | 37 | 38 | #------------------------------------------------------------------------------ 39 | # FILE LOCATIONS 40 | #------------------------------------------------------------------------------ 41 | 42 | # The default values of these variables are driven from the -D command-line 43 | # option or PGDATA environment variable, represented here as ConfigDir. 44 | 45 | data_directory = '/data/database' # use data in another directory 46 | # (change requires restart) 47 | hba_file = '/etc/postgresql/13/main/pg_hba.conf' # host-based authentication file 48 | # (change requires restart) 49 | ident_file = '/etc/postgresql/13/main/pg_ident.conf' # ident configuration file 50 | # (change requires restart) 51 | 52 | # If external_pid_file is not explicitly set, no extra PID file is written. 53 | external_pid_file = '/var/run/postgresql/13-main.pid' # write an extra PID file 54 | # (change requires restart) 55 | 56 | 57 | #------------------------------------------------------------------------------ 58 | # CONNECTIONS AND AUTHENTICATION 59 | #------------------------------------------------------------------------------ 60 | 61 | # - Connection Settings - 62 | 63 | #listen_addresses = 'localhost' # what IP address(es) to listen on; 64 | # comma-separated list of addresses; 65 | # defaults to 'localhost'; use '*' for all 66 | # (change requires restart) 67 | port = 5432 # (change requires restart) 68 | max_connections = 100 # (change requires restart) 69 | #superuser_reserved_connections = 3 # (change requires restart) 70 | unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories 71 | # (change requires restart) 72 | #unix_socket_group = '' # (change requires restart) 73 | #unix_socket_permissions = 0777 # begin with 0 to use octal notation 74 | # (change requires restart) 75 | #bonjour = off # advertise server via Bonjour 76 | # (change requires restart) 77 | #bonjour_name = '' # defaults to the computer name 78 | # (change requires restart) 79 | 80 | # - TCP settings - 81 | # see "man tcp" for details 82 | 83 | #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; 84 | # 0 selects the system default 85 | #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; 86 | # 0 selects the system default 87 | #tcp_keepalives_count = 0 # TCP_KEEPCNT; 88 | # 0 selects the system default 89 | #tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; 90 | # 0 selects the system default 91 | 92 | # - Authentication - 93 | 94 | #authentication_timeout = 1min # 1s-600s 95 | #password_encryption = md5 # md5 or scram-sha-256 96 | #db_user_namespace = off 97 | 98 | # GSSAPI using Kerberos 99 | #krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' 100 | #krb_caseins_users = off 101 | 102 | # - SSL - 103 | 104 | ssl = on 105 | #ssl_ca_file = '' 106 | ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' 107 | #ssl_crl_file = '' 108 | ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' 109 | #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers 110 | #ssl_prefer_server_ciphers = on 111 | #ssl_ecdh_curve = 'prime256v1' 112 | #ssl_min_protocol_version = 'TLSv1.2' 113 | #ssl_max_protocol_version = '' 114 | #ssl_dh_params_file = '' 115 | #ssl_passphrase_command = '' 116 | #ssl_passphrase_command_supports_reload = off 117 | 118 | 119 | #------------------------------------------------------------------------------ 120 | # RESOURCE USAGE (except WAL) 121 | #------------------------------------------------------------------------------ 122 | 123 | # - Memory - 124 | 125 | shared_buffers = 128MB # min 128kB 126 | # (change requires restart) 127 | #huge_pages = try # on, off, or try 128 | # (change requires restart) 129 | #temp_buffers = 8MB # min 800kB 130 | #max_prepared_transactions = 0 # zero disables the feature 131 | # (change requires restart) 132 | # Caution: it is not advisable to set max_prepared_transactions nonzero unless 133 | # you actively intend to use prepared transactions. 134 | #work_mem = 4MB # min 64kB 135 | #hash_mem_multiplier = 1.0 # 1-1000.0 multiplier on hash table work_mem 136 | #maintenance_work_mem = 64MB # min 1MB 137 | #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem 138 | #logical_decoding_work_mem = 64MB # min 64kB 139 | #max_stack_depth = 2MB # min 100kB 140 | #shared_memory_type = mmap # the default is the first option 141 | # supported by the operating system: 142 | # mmap 143 | # sysv 144 | # windows 145 | # (change requires restart) 146 | dynamic_shared_memory_type = posix # the default is the first option 147 | # supported by the operating system: 148 | # posix 149 | # sysv 150 | # windows 151 | # mmap 152 | # (change requires restart) 153 | 154 | # - Disk - 155 | 156 | #temp_file_limit = -1 # limits per-process temp file space 157 | # in kilobytes, or -1 for no limit 158 | 159 | # - Kernel Resources - 160 | 161 | #max_files_per_process = 1000 # min 64 162 | # (change requires restart) 163 | 164 | # - Cost-Based Vacuum Delay - 165 | 166 | #vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) 167 | #vacuum_cost_page_hit = 1 # 0-10000 credits 168 | #vacuum_cost_page_miss = 10 # 0-10000 credits 169 | #vacuum_cost_page_dirty = 20 # 0-10000 credits 170 | #vacuum_cost_limit = 200 # 1-10000 credits 171 | 172 | # - Background Writer - 173 | 174 | #bgwriter_delay = 200ms # 10-10000ms between rounds 175 | #bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables 176 | #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round 177 | #bgwriter_flush_after = 512kB # measured in pages, 0 disables 178 | 179 | # - Asynchronous Behavior - 180 | 181 | #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching 182 | #maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching 183 | #max_worker_processes = 8 # (change requires restart) 184 | #max_parallel_maintenance_workers = 2 # taken from max_parallel_workers 185 | #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers 186 | #parallel_leader_participation = on 187 | #max_parallel_workers = 8 # maximum number of max_worker_processes that 188 | # can be used in parallel operations 189 | #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate 190 | # (change requires restart) 191 | #backend_flush_after = 0 # measured in pages, 0 disables 192 | 193 | 194 | #------------------------------------------------------------------------------ 195 | # WRITE-AHEAD LOG 196 | #------------------------------------------------------------------------------ 197 | 198 | # - Settings - 199 | 200 | #wal_level = replica # minimal, replica, or logical 201 | # (change requires restart) 202 | #fsync = on # flush data to disk for crash safety 203 | # (turning this off can cause 204 | # unrecoverable data corruption) 205 | #synchronous_commit = on # synchronization level; 206 | # off, local, remote_write, remote_apply, or on 207 | #wal_sync_method = fsync # the default is the first option 208 | # supported by the operating system: 209 | # open_datasync 210 | # fdatasync (default on Linux and FreeBSD) 211 | # fsync 212 | # fsync_writethrough 213 | # open_sync 214 | #full_page_writes = on # recover from partial page writes 215 | #wal_compression = off # enable compression of full-page writes 216 | #wal_log_hints = off # also do full page writes of non-critical updates 217 | # (change requires restart) 218 | #wal_init_zero = on # zero-fill new WAL files 219 | #wal_recycle = on # recycle WAL files 220 | #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers 221 | # (change requires restart) 222 | #wal_writer_delay = 200ms # 1-10000 milliseconds 223 | #wal_writer_flush_after = 1MB # measured in pages, 0 disables 224 | #wal_skip_threshold = 2MB 225 | 226 | #commit_delay = 0 # range 0-100000, in microseconds 227 | #commit_siblings = 5 # range 1-1000 228 | 229 | # - Checkpoints - 230 | 231 | #checkpoint_timeout = 5min # range 30s-1d 232 | max_wal_size = 1GB 233 | min_wal_size = 80MB 234 | #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 235 | #checkpoint_flush_after = 256kB # measured in pages, 0 disables 236 | #checkpoint_warning = 30s # 0 disables 237 | 238 | # - Archiving - 239 | 240 | #archive_mode = off # enables archiving; off, on, or always 241 | # (change requires restart) 242 | #archive_command = '' # command to use to archive a logfile segment 243 | # placeholders: %p = path of file to archive 244 | # %f = file name only 245 | # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' 246 | #archive_timeout = 0 # force a logfile segment switch after this 247 | # number of seconds; 0 disables 248 | 249 | # - Archive Recovery - 250 | 251 | # These are only used in recovery mode. 252 | 253 | #restore_command = '' # command to use to restore an archived logfile segment 254 | # placeholders: %p = path of file to restore 255 | # %f = file name only 256 | # e.g. 'cp /mnt/server/archivedir/%f %p' 257 | # (change requires restart) 258 | #archive_cleanup_command = '' # command to execute at every restartpoint 259 | #recovery_end_command = '' # command to execute at completion of recovery 260 | 261 | # - Recovery Target - 262 | 263 | # Set these only when performing a targeted recovery. 264 | 265 | #recovery_target = '' # 'immediate' to end recovery as soon as a 266 | # consistent state is reached 267 | # (change requires restart) 268 | #recovery_target_name = '' # the named restore point to which recovery will proceed 269 | # (change requires restart) 270 | #recovery_target_time = '' # the time stamp up to which recovery will proceed 271 | # (change requires restart) 272 | #recovery_target_xid = '' # the transaction ID up to which recovery will proceed 273 | # (change requires restart) 274 | #recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed 275 | # (change requires restart) 276 | #recovery_target_inclusive = on # Specifies whether to stop: 277 | # just after the specified recovery target (on) 278 | # just before the recovery target (off) 279 | # (change requires restart) 280 | #recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID 281 | # (change requires restart) 282 | #recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' 283 | # (change requires restart) 284 | 285 | 286 | #------------------------------------------------------------------------------ 287 | # REPLICATION 288 | #------------------------------------------------------------------------------ 289 | 290 | # - Sending Servers - 291 | 292 | # Set these on the master and on any standby that will send replication data. 293 | 294 | #max_wal_senders = 10 # max number of walsender processes 295 | # (change requires restart) 296 | #wal_keep_size = 0 # in megabytes; 0 disables 297 | #max_slot_wal_keep_size = -1 # in megabytes; -1 disables 298 | #wal_sender_timeout = 60s # in milliseconds; 0 disables 299 | 300 | #max_replication_slots = 10 # max number of replication slots 301 | # (change requires restart) 302 | #track_commit_timestamp = off # collect timestamp of transaction commit 303 | # (change requires restart) 304 | 305 | # - Master Server - 306 | 307 | # These settings are ignored on a standby server. 308 | 309 | #synchronous_standby_names = '' # standby servers that provide sync rep 310 | # method to choose sync standbys, number of sync standbys, 311 | # and comma-separated list of application_name 312 | # from standby(s); '*' = all 313 | #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed 314 | 315 | # - Standby Servers - 316 | 317 | # These settings are ignored on a master server. 318 | 319 | #primary_conninfo = '' # connection string to sending server 320 | #primary_slot_name = '' # replication slot on sending server 321 | #promote_trigger_file = '' # file name whose presence ends recovery 322 | #hot_standby = on # "off" disallows queries during recovery 323 | # (change requires restart) 324 | #max_standby_archive_delay = 30s # max delay before canceling queries 325 | # when reading WAL from archive; 326 | # -1 allows indefinite delay 327 | #max_standby_streaming_delay = 30s # max delay before canceling queries 328 | # when reading streaming WAL; 329 | # -1 allows indefinite delay 330 | #wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name 331 | # is not set 332 | #wal_receiver_status_interval = 10s # send replies at least this often 333 | # 0 disables 334 | #hot_standby_feedback = off # send info from standby to prevent 335 | # query conflicts 336 | #wal_receiver_timeout = 60s # time that receiver waits for 337 | # communication from master 338 | # in milliseconds; 0 disables 339 | #wal_retrieve_retry_interval = 5s # time to wait before retrying to 340 | # retrieve WAL after a failed attempt 341 | #recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery 342 | 343 | # - Subscribers - 344 | 345 | # These settings are ignored on a publisher. 346 | 347 | #max_logical_replication_workers = 4 # taken from max_worker_processes 348 | # (change requires restart) 349 | #max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers 350 | 351 | 352 | #------------------------------------------------------------------------------ 353 | # QUERY TUNING 354 | #------------------------------------------------------------------------------ 355 | 356 | # - Planner Method Configuration - 357 | 358 | #enable_bitmapscan = on 359 | #enable_hashagg = on 360 | #enable_hashjoin = on 361 | #enable_indexscan = on 362 | #enable_indexonlyscan = on 363 | #enable_material = on 364 | #enable_mergejoin = on 365 | #enable_nestloop = on 366 | #enable_parallel_append = on 367 | #enable_seqscan = on 368 | #enable_sort = on 369 | #enable_incremental_sort = on 370 | #enable_tidscan = on 371 | #enable_partitionwise_join = off 372 | #enable_partitionwise_aggregate = off 373 | #enable_parallel_hash = on 374 | #enable_partition_pruning = on 375 | 376 | # - Planner Cost Constants - 377 | 378 | #seq_page_cost = 1.0 # measured on an arbitrary scale 379 | #random_page_cost = 4.0 # same scale as above 380 | #cpu_tuple_cost = 0.01 # same scale as above 381 | #cpu_index_tuple_cost = 0.005 # same scale as above 382 | #cpu_operator_cost = 0.0025 # same scale as above 383 | #parallel_tuple_cost = 0.1 # same scale as above 384 | #parallel_setup_cost = 1000.0 # same scale as above 385 | 386 | #jit_above_cost = 100000 # perform JIT compilation if available 387 | # and query more expensive than this; 388 | # -1 disables 389 | #jit_inline_above_cost = 500000 # inline small functions if query is 390 | # more expensive than this; -1 disables 391 | #jit_optimize_above_cost = 500000 # use expensive JIT optimizations if 392 | # query is more expensive than this; 393 | # -1 disables 394 | 395 | #min_parallel_table_scan_size = 8MB 396 | #min_parallel_index_scan_size = 512kB 397 | #effective_cache_size = 4GB 398 | 399 | # - Genetic Query Optimizer - 400 | 401 | #geqo = on 402 | #geqo_threshold = 12 403 | #geqo_effort = 5 # range 1-10 404 | #geqo_pool_size = 0 # selects default based on effort 405 | #geqo_generations = 0 # selects default based on effort 406 | #geqo_selection_bias = 2.0 # range 1.5-2.0 407 | #geqo_seed = 0.0 # range 0.0-1.0 408 | 409 | # - Other Planner Options - 410 | 411 | #default_statistics_target = 100 # range 1-10000 412 | #constraint_exclusion = partition # on, off, or partition 413 | #cursor_tuple_fraction = 0.1 # range 0.0-1.0 414 | #from_collapse_limit = 8 415 | #join_collapse_limit = 8 # 1 disables collapsing of explicit 416 | # JOIN clauses 417 | #force_parallel_mode = off 418 | #jit = on # allow JIT compilation 419 | #plan_cache_mode = auto # auto, force_generic_plan or 420 | # force_custom_plan 421 | 422 | 423 | #------------------------------------------------------------------------------ 424 | # REPORTING AND LOGGING 425 | #------------------------------------------------------------------------------ 426 | 427 | # - Where to Log - 428 | 429 | #log_destination = 'stderr' # Valid values are combinations of 430 | # stderr, csvlog, syslog, and eventlog, 431 | # depending on platform. csvlog 432 | # requires logging_collector to be on. 433 | 434 | # This is used when logging to stderr: 435 | #logging_collector = off # Enable capturing of stderr and csvlog 436 | # into log files. Required to be on for 437 | # csvlogs. 438 | # (change requires restart) 439 | 440 | # These are only used if logging_collector is on: 441 | #log_directory = 'log' # directory where log files are written, 442 | # can be absolute or relative to PGDATA 443 | #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, 444 | # can include strftime() escapes 445 | #log_file_mode = 0600 # creation mode for log files, 446 | # begin with 0 to use octal notation 447 | #log_truncate_on_rotation = off # If on, an existing log file with the 448 | # same name as the new log file will be 449 | # truncated rather than appended to. 450 | # But such truncation only occurs on 451 | # time-driven rotation, not on restarts 452 | # or size-driven rotation. Default is 453 | # off, meaning append to existing files 454 | # in all cases. 455 | #log_rotation_age = 1d # Automatic rotation of logfiles will 456 | # happen after that time. 0 disables. 457 | #log_rotation_size = 10MB # Automatic rotation of logfiles will 458 | # happen after that much log output. 459 | # 0 disables. 460 | 461 | # These are relevant when logging to syslog: 462 | #syslog_facility = 'LOCAL0' 463 | #syslog_ident = 'postgres' 464 | #syslog_sequence_numbers = on 465 | #syslog_split_messages = on 466 | 467 | # This is only relevant when logging to eventlog (win32): 468 | # (change requires restart) 469 | #event_source = 'PostgreSQL' 470 | 471 | # - When to Log - 472 | 473 | #log_min_messages = warning # values in order of decreasing detail: 474 | # debug5 475 | # debug4 476 | # debug3 477 | # debug2 478 | # debug1 479 | # info 480 | # notice 481 | # warning 482 | # error 483 | # log 484 | # fatal 485 | # panic 486 | 487 | #log_min_error_statement = error # values in order of decreasing detail: 488 | # debug5 489 | # debug4 490 | # debug3 491 | # debug2 492 | # debug1 493 | # info 494 | # notice 495 | # warning 496 | # error 497 | # log 498 | # fatal 499 | # panic (effectively off) 500 | 501 | #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements 502 | # and their durations, > 0 logs only 503 | # statements running at least this number 504 | # of milliseconds 505 | 506 | #log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements 507 | # and their durations, > 0 logs only a sample of 508 | # statements running at least this number 509 | # of milliseconds; 510 | # sample fraction is determined by log_statement_sample_rate 511 | 512 | #log_statement_sample_rate = 1.0 # fraction of logged statements exceeding 513 | # log_min_duration_sample to be logged; 514 | # 1.0 logs all such statements, 0.0 never logs 515 | 516 | 517 | #log_transaction_sample_rate = 0.0 # fraction of transactions whose statements 518 | # are logged regardless of their duration; 1.0 logs all 519 | # statements from all transactions, 0.0 never logs 520 | 521 | # - What to Log - 522 | 523 | #debug_print_parse = off 524 | #debug_print_rewritten = off 525 | #debug_print_plan = off 526 | #debug_pretty_print = on 527 | #log_checkpoints = off 528 | #log_connections = off 529 | #log_disconnections = off 530 | #log_duration = off 531 | #log_error_verbosity = default # terse, default, or verbose messages 532 | #log_hostname = off 533 | log_line_prefix = '%m [%p] %q%u@%d ' # special values: 534 | # %a = application name 535 | # %u = user name 536 | # %d = database name 537 | # %r = remote host and port 538 | # %h = remote host 539 | # %b = backend type 540 | # %p = process ID 541 | # %t = timestamp without milliseconds 542 | # %m = timestamp with milliseconds 543 | # %n = timestamp with milliseconds (as a Unix epoch) 544 | # %i = command tag 545 | # %e = SQL state 546 | # %c = session ID 547 | # %l = session line number 548 | # %s = session start timestamp 549 | # %v = virtual transaction ID 550 | # %x = transaction ID (0 if none) 551 | # %q = stop here in non-session 552 | # processes 553 | # %% = '%' 554 | # e.g. '<%u%%%d> ' 555 | #log_lock_waits = off # log lock waits >= deadlock_timeout 556 | #log_parameter_max_length = -1 # when logging statements, limit logged 557 | # bind-parameter values to N bytes; 558 | # -1 means print in full, 0 disables 559 | #log_parameter_max_length_on_error = 0 # when logging an error, limit logged 560 | # bind-parameter values to N bytes; 561 | # -1 means print in full, 0 disables 562 | #log_statement = 'none' # none, ddl, mod, all 563 | #log_replication_commands = off 564 | #log_temp_files = -1 # log temporary files equal or larger 565 | # than the specified size in kilobytes; 566 | # -1 disables, 0 logs all temp files 567 | log_timezone = 'Etc/UTC' 568 | 569 | #------------------------------------------------------------------------------ 570 | # PROCESS TITLE 571 | #------------------------------------------------------------------------------ 572 | 573 | cluster_name = '13/main' # added to process titles if nonempty 574 | # (change requires restart) 575 | #update_process_title = on 576 | 577 | 578 | #------------------------------------------------------------------------------ 579 | # STATISTICS 580 | #------------------------------------------------------------------------------ 581 | 582 | # - Query and Index Statistics Collector - 583 | 584 | #track_activities = on 585 | #track_counts = on 586 | #track_io_timing = off 587 | #track_functions = none # none, pl, all 588 | #track_activity_query_size = 1024 # (change requires restart) 589 | stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp' 590 | 591 | 592 | # - Monitoring - 593 | 594 | #log_parser_stats = off 595 | #log_planner_stats = off 596 | #log_executor_stats = off 597 | #log_statement_stats = off 598 | 599 | 600 | #------------------------------------------------------------------------------ 601 | # AUTOVACUUM 602 | #------------------------------------------------------------------------------ 603 | 604 | #autovacuum = on # Enable autovacuum subprocess? 'on' 605 | # requires track_counts to also be on. 606 | #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and 607 | # their durations, > 0 logs only 608 | # actions running at least this number 609 | # of milliseconds. 610 | #autovacuum_max_workers = 3 # max number of autovacuum subprocesses 611 | # (change requires restart) 612 | #autovacuum_naptime = 1min # time between autovacuum runs 613 | #autovacuum_vacuum_threshold = 50 # min number of row updates before 614 | # vacuum 615 | #autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts 616 | # before vacuum; -1 disables insert 617 | # vacuums 618 | #autovacuum_analyze_threshold = 50 # min number of row updates before 619 | # analyze 620 | #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum 621 | #autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table 622 | # size before insert vacuum 623 | #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze 624 | #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum 625 | # (change requires restart) 626 | #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age 627 | # before forced vacuum 628 | # (change requires restart) 629 | #autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for 630 | # autovacuum, in milliseconds; 631 | # -1 means use vacuum_cost_delay 632 | #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for 633 | # autovacuum, -1 means use 634 | # vacuum_cost_limit 635 | 636 | 637 | #------------------------------------------------------------------------------ 638 | # CLIENT CONNECTION DEFAULTS 639 | #------------------------------------------------------------------------------ 640 | 641 | # - Statement Behavior - 642 | 643 | #client_min_messages = notice # values in order of decreasing detail: 644 | # debug5 645 | # debug4 646 | # debug3 647 | # debug2 648 | # debug1 649 | # log 650 | # notice 651 | # warning 652 | # error 653 | #search_path = '"$user", public' # schema names 654 | #row_security = on 655 | #default_tablespace = '' # a tablespace name, '' uses the default 656 | #temp_tablespaces = '' # a list of tablespace names, '' uses 657 | # only default tablespace 658 | #default_table_access_method = 'heap' 659 | #check_function_bodies = on 660 | #default_transaction_isolation = 'read committed' 661 | #default_transaction_read_only = off 662 | #default_transaction_deferrable = off 663 | #session_replication_role = 'origin' 664 | #statement_timeout = 0 # in milliseconds, 0 is disabled 665 | #lock_timeout = 0 # in milliseconds, 0 is disabled 666 | #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled 667 | #vacuum_freeze_min_age = 50000000 668 | #vacuum_freeze_table_age = 150000000 669 | #vacuum_multixact_freeze_min_age = 5000000 670 | #vacuum_multixact_freeze_table_age = 150000000 671 | #vacuum_cleanup_index_scale_factor = 0.1 # fraction of total number of tuples 672 | # before index cleanup, 0 always performs 673 | # index cleanup 674 | #bytea_output = 'hex' # hex, escape 675 | #xmlbinary = 'base64' 676 | #xmloption = 'content' 677 | #gin_fuzzy_search_limit = 0 678 | #gin_pending_list_limit = 4MB 679 | 680 | # - Locale and Formatting - 681 | 682 | datestyle = 'iso, mdy' 683 | #intervalstyle = 'postgres' 684 | timezone = 'Etc/UTC' 685 | #timezone_abbreviations = 'Default' # Select the set of available time zone 686 | # abbreviations. Currently, there are 687 | # Default 688 | # Australia (historical usage) 689 | # India 690 | # You can create your own file in 691 | # share/timezonesets/. 692 | #extra_float_digits = 1 # min -15, max 3; any value >0 actually 693 | # selects precise output mode 694 | #client_encoding = sql_ascii # actually, defaults to database 695 | # encoding 696 | 697 | # These settings are initialized by initdb, but they can be changed. 698 | lc_messages = 'C.UTF-8' # locale for system error message 699 | # strings 700 | lc_monetary = 'C.UTF-8' # locale for monetary formatting 701 | lc_numeric = 'C.UTF-8' # locale for number formatting 702 | lc_time = 'C.UTF-8' # locale for time formatting 703 | 704 | # default configuration for text search 705 | default_text_search_config = 'pg_catalog.english' 706 | 707 | # - Shared Library Preloading - 708 | 709 | #shared_preload_libraries = '' # (change requires restart) 710 | #local_preload_libraries = '' 711 | #session_preload_libraries = '' 712 | #jit_provider = 'llvmjit' # JIT library to use 713 | 714 | # - Other Defaults - 715 | 716 | #dynamic_library_path = '$libdir' 717 | #extension_destdir = '' # prepend path when loading extensions 718 | # and shared objects (added by Debian) 719 | 720 | 721 | #------------------------------------------------------------------------------ 722 | # LOCK MANAGEMENT 723 | #------------------------------------------------------------------------------ 724 | 725 | #deadlock_timeout = 1s 726 | #max_locks_per_transaction = 64 # min 10 727 | # (change requires restart) 728 | #max_pred_locks_per_transaction = 64 # min 10 729 | # (change requires restart) 730 | #max_pred_locks_per_relation = -2 # negative values mean 731 | # (max_pred_locks_per_transaction 732 | # / -max_pred_locks_per_relation) - 1 733 | #max_pred_locks_per_page = 2 # min 0 734 | 735 | 736 | #------------------------------------------------------------------------------ 737 | # VERSION AND PLATFORM COMPATIBILITY 738 | #------------------------------------------------------------------------------ 739 | 740 | # - Previous PostgreSQL Versions - 741 | 742 | #array_nulls = on 743 | #backslash_quote = safe_encoding # on, off, or safe_encoding 744 | #escape_string_warning = on 745 | #lo_compat_privileges = off 746 | #operator_precedence_warning = off 747 | #quote_all_identifiers = off 748 | #standard_conforming_strings = on 749 | #synchronize_seqscans = on 750 | 751 | # - Other Platforms and Clients - 752 | 753 | #transform_null_equals = off 754 | 755 | 756 | #------------------------------------------------------------------------------ 757 | # ERROR HANDLING 758 | #------------------------------------------------------------------------------ 759 | 760 | #exit_on_error = off # terminate session on any error? 761 | #restart_after_crash = on # reinitialize after backend crash? 762 | #data_sync_retry = off # retry or panic on failure to fsync 763 | # data? 764 | # (change requires restart) 765 | 766 | 767 | #------------------------------------------------------------------------------ 768 | # CONFIG FILE INCLUDES 769 | #------------------------------------------------------------------------------ 770 | 771 | # These options allow settings to be loaded from files other than the 772 | # default postgresql.conf. Note that these are directives, not variable 773 | # assignments, so they can usefully be given more than once. 774 | 775 | include_dir = 'conf.d' # include files ending in '.conf' from 776 | # a directory, e.g., 'conf.d' 777 | #include_if_exists = '...' # include file only if it exists 778 | #include = '...' # include file 779 | 780 | 781 | #------------------------------------------------------------------------------ 782 | # CUSTOMIZED OPTIONS 783 | #------------------------------------------------------------------------------ 784 | 785 | # Add settings for extensions here 786 | --------------------------------------------------------------------------------