So, we'll use the new standard OliveTin Docker compose with modifications in each service's volumes
section, changing olivetin
to olivetin-for-channels
:
version: '3.9'
services:
olivetin: # This docker-compose requires little or no editing. Set the Environment variables section of Portainer.
# GitHub home for this project: https://github.com/bnhf/OliveTin.
# Docker container home for this project with setup instructions: https://hub.docker.com/repository/docker/bnhf/olivetin.
image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below.
container_name: olivetin
hostname: olivetin
dns_search: ${DOMAIN} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes, otherwise use your local domain name.
ports:
- ${HOST_PORT}:1337
environment:
- CHANNELS_DVR=${CHANNELS_DVR_HOST}:${CHANNELS_DVR_PORT} # Add your Channels DVR server in the form CHANNELS_DVR_HOST=<hostname or ip> and CHANNELS_DVR_PORT=<port>.
#- CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR2_HOST}:${CHANNELS_DVR2_PORT} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port.
- CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP.
- ALERT_SMTP_SERVER=${ALERT_SMTP_SERVER} # SMTP server to use for sending alert e-mails. smtp.gmail.com:587 for example.
- ALERT_EMAIL_FROM=${ALERT_EMAIL_FROM} # Sender address for alert e-mails.
- ALERT_EMAIL_PASS=${ALERT_EMAIL_PASS} # SMTP "app" password established through GMail or Yahoo Mail. Do not use your everyday e-mail address.
- ALERT_EMAIL_TO=${ALERT_EMAIL_TO} # Recipient address for alert e-mails.
- UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml.
- UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts.
- TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc.
- PORTAINER_TOKEN=${PORTAINER_TOKEN} # Generate via <username> dropdown (upper right of WebUI), "My account", API tokens.
- PORTAINER_HOST=${PORTAINER_HOST} # Hostname or IP of the Docker host you're running Portainer on.
volumes:
- ${HOST_DIR}/olivetin-for-channels:/config # Add the parent directory on your Docker you'd like to use.
- ${DVR_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share.
- ${LOGS_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
#- ${DVR2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT} # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between).
#- ${LOGS2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
restart: unless-stopped
static-file-server:
image: halverneus/static-file-server:latest
container_name: static-file-server
dns_search: ${DOMAIN}
ports:
- ${HOST_SFS_PORT}:8080
environment:
- FOLDER=${FOLDER}
volumes:
- ${HOST_DIR}/olivetin-for-channels/data:${FOLDER}
restart: unless-stopped
#volumes: # Use this section if you've setup docker volumes named channels-dvr and channels-dvr-logs, with CIFS or NFS, to bind to /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} and /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs inside the container. Set DVR_SHARE=channels-dvr and LOGS_SHARE=channels-dvr-logs in this example.
#channels-dvr:
#external: true
#channels-dvr-logs:
#external: true
Here's my suggested environment section:
TAG=latest
DOMAIN=local
HOST_PORT=1337
CHANNELS_DVR_HOST=10.0.1.21
CHANNELS_DVR_PORT=8089
CHANNELS_DVR2_HOST=
CHANNELS_DVR2_PORT=
CHANNELS_CLIENTS=10.0.1.81 10.0.1.151 10.0.1.112
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Pacific
HOST_DIR=/Volumes/Channels-DVR/Channels DVR
DVR_SHARE=
LOGS_SHARE=
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=
PORTAINER_HOST=10.0.1.21
You'll need to add your PORTAINER_TOKEN, DVR_SHARE and LOGS_SHARE values. LOGS_SHARE you can get by going to your current OliveTin and doing the following:
The path shown in the output, minus the last part that'll be data
, is your LOGS_SHARE path.
The DVR_SHARE path, you probably already know, as this is the path to your Channels DVR data. On my Mac-Mini-M2 it's /Users/slayer/channels-data
, but it'll be different for you.
Once you have your env vars determined, you can stop your current olivetin
stack, and then either replace the data with the above, or create a new stack called olivetin2
if you prefer.
Also, be aware you may need to change the port for the new static-file-server
part of the stack if 8080 is in use on your system. 8081, or whatever, is fine for HOST_SFS_PORT.