@flamingm0e you were extremely helpful getting my docker setup and running last year. I promised to share mine once it gets stable.
It’s continued to grow so I thought I’d do a status update: This isn’t everything, since come of the customizations are specific to my local setup. I’ll put some explanation in the next comment but feel free to ask any questions.
version: '3.1'
services:
nginx:
container_name: nginx
restart: unless-stopped
build:
context: ./containers/nginx
ports:
- "80:80"
- "443:443"
volumes:
- /srv/docker/nginx:/var/log/nginx
- /srv/docker/letsencrypt:/etc/letsencrypt
jenkins:
container_name: jenkins
restart: unless-stopped
image: jenkins/jenkins
ports:
- "8080:8080"
volumes:
- /srv/docker/jenkins:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
portainer:
container_name: portainer
restart: unless-stopped
image: portainer/portainer
volumes:
- /srv/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"
homeassistant:
container_name: home-assistant
restart: unless-stopped
image: homeassistant/home-assistant
depends_on:
- "mariadb"
devices:
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- /srv/docker/hass-config:/config
- /etc/localtime:/etc/localtime:ro
network_mode: host
privileged: true
mariadb:
container_name: mariadb
restart: unless-stopped
build:
context: ./containers/mariadb
volumes:
- /mnt/mariadb:/var/lib/mysql
ports:
- ${MARIADB_PORT}:3306
network_mode: bridge
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_PASSWORD}
openvpn:
build:
context: ./containers/openvpn
cap_add:
- NET_ADMIN
container_name: openvpn
restart: unless-stopped
volumes:
- /srv/docker/openvpn-data/conf:/etc/openvpn
network_mode: bridge
ports:
- "8999:1194/udp"
serviio:
build:
context: ./containers/serviio
container_name: serviio
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /srv/docker/serviio/config:/config
- /mnt/video:/media/video
- /mnt/music:/media/music
- /srv/docker/serviio/transcode:/transcode
network_mode: bridge
privileged: true
ports:
- "8111:80"
- "23423:23423"
- "23424:23424"
- "8895:8895"
- "1900:1900/udp"
handbrake:
build:
context: ./containers/handbrake
container_name: handbrake
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /srv/docker/handbrake/config:/config:rw
- /mnt/video:/storage
- /srv/docker/handbrake/watch:/watch:rw
- /mnt/video/output:/output:rw
network_mode: bridge
privileged: true
ports:
- "5800:5800"
influxdb:
container_name: influxdb
restart: unless-stopped
image: influxdb
volumes:
- /srv/docker/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf:ro
- /srv/docker/influxdb/db:/var/lib/influxdb
environment:
- INFLUX_GRAPHITE_ENABLED='true'
ports:
- "8086:8086"
chronograf:
container_name: chronograf
restart: unless-stopped
image: chronograf
depends_on:
- "influxdb"
volumes:
- /srv/docker/chronograf:/var/lib/chronograf
ports:
- "8888:8888"
grafana:
container_name: grafana
restart: unless-stopped
image: grafana/grafana:5.0.0
depends_on:
- "influxdb"
volumes:
- /srv/docker/grafana:/var/lib/grafana
ports:
- "3000:3000"
nodered:
build:
context: ./containers/nodered
container_name: nodered
restart: unless-stopped
user: root
volumes:
- /etc/localtime:/etc/localtime:ro
- /srv/docker/nodered/config:/data
ports:
- "1880:1880"
elasticsearch:
container_name: elasticsearch
restart: unless-stopped
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.2
environment:
- LOGSPOUT=ignore
- cluster.name=docker-cluster
- "ES_JAVA_OPTS=-Xms2048m -Xmx2048m"
network_mode: host
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticdata:/usr/share/elasticsearch/data
filebeat:
container_name: filebeat
restart: unless-stopped
build:
context: ./containers/filebeat
user: root
volumes:
- /srv/docker/nginx:/usr/share/filebeat/outsidelogs/nginx
- /srv/docker/hass-config/home-assistant.log:/usr/share/filebeat/outsidelogs/homeassistant/home-assistant.log
kibana:
container_name: kibana
restart: unless-stopped
image: docker.elastic.co/kibana/kibana-oss:6.4.2
environment:
- LOGSPOUT=ignore
- ELASTICSEARCH_URL="http://172.16.17.20:9200"
ports:
- "5601:5601"
depends_on:
- elasticsearch
piwigo:
container_name: piwigo
restart: unless-stopped
build:
context: ./containers/piwigo
depends_on:
- "mariadb"
volumes:
- /mnt/piwigo/data/galleries:/var/www/galleries
- /srv/docker/piwigo/data/local:/var/www/local
- /srv/docker/piwigo/data/plugins:/var/www/plugins
- /srv/docker/piwigo/data/themes:/var/www/themes
- /mnt/piwigo/cache:/var/www/_data/i
- /mnt/piwigo/upload:/var/www/upload
- /srv/docker/piwigo/log:/var/log
- /srv/docker/piwigo/log/apache2:/var/log/apach2
- /etc/localtime:/etc/localtime:ro
network_mode: bridge
ports:
- 2500:80
hostname: piwigo
domainname: piwigo.nj.lan
nutups:
container_name: nut_ups
restart: always
build:
context: ./containers/nutupsd
# image: instantlinux/nut-upsd:latest
environment:
- VENDORID=09ae
- DESCRIPTION=Tripp Lite SMART1500LCD
- POLLINTERVAL=12
network_mode: host
ports:
- 3493:3493
devices:
- /dev/usb/hiddev0:/dev/usb/hiddev0
privileged: true
volumes:
- /srv/docker/nutups:/etc/nut/local
secrets:
- nut-upsd-password
nextcloud:
container_name: nextcloud
image: nextcloud
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=root
- MYSQL_HOST=${MARIADB_HOST}
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
ports:
- 8500:80
volumes:
- /srv/docker/nextcloud/html:/var/www/html
- /srv/docker/nextcloud/apps:/var/www/html/custom_apps
- /srv/docker/nextcloud/config:/var/www/html/config
- /srv/docker/nextcloud/theme:/var/www/html/theme
- /mnt/nextcloud/data:/var/www/html/data
- /srv/docker/nextcloud/apachelogs:/var/log/apache2
unms:
image: oznu/unms:latest
restart: always
network_mode: bridge
ports:
- 2080:80
- 2443:443
- 2055:2055/udp
environment:
- TZ="America/New_York"
volumes:
- /srv/docker/unms:/config
autoheal:
restart: always
image: willfarrell/autoheal
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
clarity:
restart: always
image: spira/docker-clarity
ports:
- 2900:8989
volumes:
- /srv/docker/clarity:/data/logs
- /srv/docker/nginx:/data/logs/nginx
- /srv/docker/hass-config/home-assistant.log:/data/logs/homeassistant/home-assistant.log
secrets:
nut-upsd-password:
file: ./nutpass
volumes:
elasticdata:
driver: local
driver_opts:
type: nfs
o: addr=xxx.xxx.xx.xx,rw,async,noatime,nodiratime,nfsvers=4
device: ":/volume2/elasticsearch"
# mqtt:
# container_name: MQTT
# restart: unless-stopped
# image: eclipse-mosquitto
# volumes:
# - /srv/docker/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
# - /srv/docker/mosquitto/log:/mosquitto/log
# - /srv/docker/mosquitto/data:/mosquitto/data
# - /etc/localtime:/etc/localtime:ro
# ports:
# - "1883:1883"
# - "9001:9001"
# kodi:
# container_name: kodi
# image: linuxserver/kodi-headless
# restart: unless-stopped
# volumes:
# - /etc/localtime:/etc/localtime:ro
# - /srv/docker/kodi/config:/config/.kodi
# - /mnt/video:/media/video
# ports:
# - "6080:8080"
# - "9090:9090"
# - "9777:9777/udp"
# snips:
# build:
# context: ./containers/snips
# container_name: snips
# restart: unless-stopped
# user: root
# volumes:
# - /etc/localtime:/etc/localtime:ro
# logstash:
# container_name: logstash
# image: docker.elastic.co/logstash/logstash-oss:6.4.2
# environment:
# - LOGSPOUT=ignore
# - LS_HEAP_SIZE="2g"
# network_mode: bridge
# ports:
# - "5000:5000/udp"
# - "5000:5000"
# - "9600:9600"
# - "5044:5044"
# volumes:
# - /srv/docker/logstash/pipeline/:/usr/share/logstash/pipeline/
# - /srv/docker/logstash/logstash.yml:/usr/share/logstash/logstash.yml
# depends_on:
# - elasticsearch
# zoneminder:
# build:
# context: ./containers/zoneminder
# container_name: zoneminder
# volumes:
# - /srv/docker/zoneminder/events:/var/lib/zoneminder/events
# - /srv/docker/zoneminder/images:/var/lib/zoneminder/images
# - /srv/docker/zoneminder/mysql:/var/lib/mysql
# - /srv/docker/zoneminder/logs:/var/log/zm
# environment:
# - shm-size="512m"
# - TZ="America/New_York"
# - ZM_DB_USER=${ZM_DB_USER}
# - ZM_DB_PASS=${MARIADB_PASSWORD}
# - ZM_DB_NAME=${ZM_DB_NAME}
# - ZM_DB_HOST=${ZM_DB_HOST}
# network_mode: bridge
# ports:
# - "8775:80"
# - "8776:443"
# eapcontroller:
# build:
# context: ./containers/eapcontroller
# container_name: eapcontroller
# restart: unless-stopped
# volumes:
# - /etc/localtime:/etc/localtime:ro
# - /srv/docker/eap/config:/config
# network_mode: host
# privileged: true
# ports:
# - "8088:8088"