├── .env ├── .gitignore ├── Dockerfile ├── Dockerfile.amd64 ├── Dockerfile.arm64 ├── README.md ├── clear.sh ├── docker-compose.vlan.yml ├── docker-compose.yml ├── entry.sh ├── lomod.env ├── run.sh └── unraid-xml └── lomo-backend.xml /.env: -------------------------------------------------------------------------------- 1 | IMG=lomorage/raspberrypi-lomorage:latest 2 | AUTO_UPDATE_IMG=containrrr/watchtower:armhf-latest 3 | 4 | # IMG=lomorage/amd64-lomorage:latest 5 | # AUTO_UPDATE_IMG=containrrr/watchtower:amd64-latest 6 | 7 | LOMOD_PORT=8000 8 | 9 | # change the directories in your env 10 | HOME_MEDIA_DIR=/media 11 | HOME_LOMO_DIR=/home/${USER}/lomo 12 | 13 | # mdns works in vlan, change vlan settings in your env 14 | NETWORK_TYPE=ipvlan # macvlan 15 | NETWORK_INF=eth0 16 | SUBNET=192.168.1.0/24 17 | GATEWAY=192.168.1.1 18 | VLAN_ADDR=192.168.1.79 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM balenalib/raspberrypi3-debian:buster 2 | 3 | RUN apt-get update && \ 4 | apt-get -qy install ca-certificates apt-transport-https wget systemd 5 | 6 | RUN wget -qO - https://raw.githubusercontent.com/lomoware/lomoware.github.io/master/debian/gpg.key | sudo apt-key add - 7 | 8 | RUN echo "deb https://lomoware.lomorage.com/debian/buster buster main" | sudo tee /etc/apt/sources.list.d/lomoware.list 9 | 10 | RUN apt-get update && apt-get -qy install lomo-vips 11 | 12 | RUN apt-get update && apt-get -qy install nfs-common ffmpeg util-linux rsync jq libimage-exiftool-perl avahi-utils avahi-daemon 13 | 14 | RUN apt-get update && apt-get -qy install psmisc net-tools iproute2 15 | 16 | ARG DUMMY=unknown 17 | 18 | RUN DUMMY=${DUMMY} apt-get update && apt-get -qy install lomo-backend-docker 19 | 20 | ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 21 | 22 | COPY entry.sh /usr/bin/entry.sh 23 | 24 | ENTRYPOINT ["/usr/bin/entry.sh"] 25 | -------------------------------------------------------------------------------- /Dockerfile.amd64: -------------------------------------------------------------------------------- 1 | FROM amd64/ubuntu:focal-20211006 2 | 3 | RUN apt-get update && \ 4 | apt-get -qy install ca-certificates apt-transport-https wget systemd gnupg2 5 | 6 | RUN wget -qO - https://raw.githubusercontent.com/lomoware/lomoware.github.io/master/debian/gpg.key | apt-key add - 7 | 8 | RUN echo "deb https://lomoware.lomorage.com/debian/focal focal main" | tee /etc/apt/sources.list.d/lomoware.list 9 | 10 | RUN apt-get update && apt-get -qy install lomo-vips 11 | 12 | RUN apt-get update && apt-get -qy install nfs-common ffmpeg util-linux rsync jq libimage-exiftool-perl avahi-utils avahi-daemon 13 | 14 | RUN apt-get update && apt-get -qy install psmisc net-tools iproute2 15 | 16 | ENV SUDO_USER root 17 | 18 | ARG DUMMY=unknown 19 | 20 | RUN DUMMY=${DUMMY} apt-get update && apt-get -qy install sudo lomo-backend-docker 21 | 22 | ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 23 | 24 | COPY entry.sh /usr/bin/entry.sh 25 | 26 | ENTRYPOINT ["/usr/bin/entry.sh"] 27 | -------------------------------------------------------------------------------- /Dockerfile.arm64: -------------------------------------------------------------------------------- 1 | FROM balenalib/raspberrypi4-64:bullseye 2 | 3 | RUN apt-get update && \ 4 | apt-get -qy install ca-certificates apt-transport-https wget systemd 5 | 6 | RUN wget -qO - https://raw.githubusercontent.com/lomoware/lomoware.github.io/master/debian/gpg.key | sudo apt-key add - 7 | 8 | RUN echo "deb https://lomoware.lomorage.com/debian/bullseye bullseye main" | sudo tee /etc/apt/sources.list.d/lomoware.list 9 | 10 | RUN apt-get update && apt-get -qy install lomo-vips 11 | 12 | RUN apt-get update && apt-get -qy install nfs-common ffmpeg util-linux rsync jq libimage-exiftool-perl avahi-utils avahi-daemon 13 | 14 | RUN apt-get update && apt-get -qy install psmisc net-tools iproute2 15 | 16 | ARG DUMMY=unknown 17 | 18 | RUN DUMMY=${DUMMY} apt-get update && apt-get -qy install lomo-backend-docker 19 | 20 | ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 21 | 22 | COPY entry.sh /usr/bin/entry.sh 23 | 24 | ENTRYPOINT ["/usr/bin/entry.sh"] 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | - [Install docker](#install-docker) 3 | - [Get docker image](#get-docker-image) 4 | * [Pull from docker hub](#pull-from-docker-hub) 5 | * [Build by your self](#build-by-your-self) 6 | - [Run](#run) 7 | - [Update dockerhub](#update-dockerhub) 8 | 9 | Please follow step2 at https://lomosw.lomorage.com/en/index.html to initialize the systeam and create users once you have lomo-docker setup successfully. 10 | 11 | # Install docker 12 | 13 | Please follow [instruction](https://docs.docker.com/engine/install/) on docker offical site to install docker 14 | 15 | note: If you are using OMSC, you probably need to change "id=osmc" in /etc/os-release to "id=raspbain" 16 | 17 | ``` 18 | sudo apt install -y ca-certificates 19 | sudo update-ca-certificates --fresh 20 | curl -fSLs https://get.docker.com | sudo sh 21 | sudo usermod -aG docker $USER 22 | sudo systemctl start docker 23 | sudo docker info 24 | ``` 25 | 26 | # Get docker image 27 | 28 | You can either pull docker image from docker hub, or build yourself. 29 | 30 | ## Pull from docker hub 31 | 32 | If using arm: 33 | 34 | ``` 35 | sudo docker pull lomorage/raspberrypi-lomorage:latest 36 | ``` 37 | 38 | If using arm64: 39 | 40 | ``` 41 | sudo docker pull lomorage/arm64-lomorage:latest 42 | ``` 43 | 44 | If using x86/amd64: 45 | 46 | ``` 47 | sudo docker pull lomorage/amd64-lomorage:latest 48 | ``` 49 | 50 | ## Build by your self 51 | 52 | ``` 53 | # build for arm 54 | sudo docker build --build-arg DEBIAN_FRONTEND=noninteractive --build-arg DUMMY=`date +%s` -t lomorage/raspberrypi-lomorage . 55 | 56 | # build for arm64 57 | sudo docker build -f Dockerfile.arm64 --build-arg DEBIAN_FRONTEND=noninteractive --build-arg DUMMY=`date +%s` -t lomorage/arm64-lomorage . 58 | 59 | # build for x86/amd64 60 | sudo docker build -f Dockerfile.amd64 --build-arg DEBIAN_FRONTEND=noninteractive --build-arg DUMMY=`date +%s` -t lomorage/amd64-lomorage . 61 | ``` 62 | 63 | # Run 64 | 65 | You have two options: 66 | 67 | ## Option 1 68 | 69 | use run.sh, download it first: 70 | 71 | ``` 72 | wget https://raw.githubusercontent.com/lomorage/lomo-docker/master/run.sh 73 | ``` 74 | 75 | You can specify the media home directory and lomo directory(**make sure to use absolute directory here**), otherwise it will use the default, you **MUST** specify the host. 76 | 77 | ``` 78 | run.sh [-m {media-dir} -k {backup-dir} -b {lomo-dir} -d -u -p {lomod-port} -i {image-name}] -t vlan-type -s subnet -g gateway -n network-interface -a vlan-address 79 | 80 | 81 | You can use either use macvlan or ipvlan which makes MDNS service discovery work. 82 | But macvlan and ipvlan are only support on Linux, so if you are on Windows or Mac, you can't use it. 83 | 84 | Command line options: 85 | -m DIR path of media directory used for media assets, default to "/media/primary", optional 86 | -k DIR path of media backup directory used for media assets, default to "/media/backup", optional 87 | -b DIR path of lomo directory used for db and log files, default to "/home/jeromy/lomo", optional 88 | -s SUBNET Subnet of the host network(like 192.168.1.0/24), required when using vlan 89 | -g GATEWAY gateway of the host network(like 192.168.1.1), required when using vlan 90 | -n NETWORK_INF network interface of the host network(like eth0), required when using vlan 91 | -t VLAN_TYPE vlan type, can be "macvlan" or "ipvlan", required when using vlan 92 | -a VLAN_ADDR vlan address to be used(like 192.168.1.99), required when using vlan 93 | -p LOMOD_PORT lomo-backend service port exposed on host machine, default to "8000", optional 94 | -i IMAGE_NAME docker image name, for example "lomorage/raspberrypi-lomorage:[tag]", default "lomorage/raspberrypi-lomorage:latest", optional 95 | -e ENV_FILE environment variable file passed into container, optional 96 | -d Debug mode to run in foreground, default to 0, optional 97 | -u Auto upgrade lomorage docker images, default to 0, optional 98 | 99 | Examples: 100 | # assuming your hard drive mounted in /media, like /media/usb0, /media/usb1 101 | ./run.sh -m /media/usb0 -k /media/usb1 -b /home/pi/lomo -s 192.168.1.0/24 -g 192.168.1.1 -n eth0 -t macvlan -a 192.168.1.99 -u 102 | 103 | # or if you don't use vlan 104 | ./run.sh -m /media -b /home/pi/lomo -u 105 | ``` 106 | 107 | You can add the command in "/etc/rc.local" before "exit 0" to make it run automatically after system boot. 108 | 109 | You can set environment variables in the container by using env file, if you use `-e ENV_FILE`. 110 | 111 | For example you can have the following in the env file (check "[lomod.env](lomod.env)" to customize the webpage footer. 112 | 113 | ``` 114 | LOMOW_FOOT_HTML=粤ICP备168xxxxxxx号 115 | ``` 116 | 117 | Or you can disable disk mount monitor is having some problem when monitoring the disk status 118 | 119 | ``` 120 | LOMOD_DISABLE_MOUNT_MONITOR=1 121 | ``` 122 | 123 | ## Option 2 124 | 125 | You can use docker compose, if you are on OSX or Windows, use "[docker-compose.yml](docker-compose.yml)", if you are on Linux, you can use "[docker-compose.vlan.yml](docker-compose.vlan.yml)" with which MDNS works. 126 | Make sure to modify "[.env](.env)" in your env. 127 | 128 | You can remove line `- ${HOME_MEDIA_BAKUP_DIR}:/media/backup` if you don't want to set backup directory. The default data directory in Docker is "/media/primary", make sure you choose this when you launching Lomorage APP on phone the first time. 129 | 130 | ``` 131 | # on OSX or Windows 132 | docker-compose up 133 | 134 | # on Linux 135 | sudo docker-compose -f docker-compose.vlan.yml up 136 | ``` 137 | 138 | You can use [environment variables](https://docs.docker.com/compose/environment-variables/#the-env_file-configuration-option) in the container with docker compose as well. 139 | 140 | For example you can have the following in the env file to customize the webpage footer. 141 | 142 | ``` 143 | LOMOW_FOOT_HTML="粤ICP备168xxxxxxx号" 144 | ``` 145 | 146 | Or you can disable disk mount monitor is having some problem when monitoring the disk status 147 | 148 | ``` 149 | LOMOD_DISABLE_MOUNT_MONITOR=1 150 | ``` 151 | 152 | # Update dockerhub 153 | 154 | Retag and then push: 155 | 156 | arm: 157 | 158 | ``` 159 | sudo docker tag lomorage/raspberrypi-lomorage:latest lomorage/raspberrypi-lomorage:latest 160 | sudo docker push lomorage/raspberrypi-lomorage:latest 161 | ``` 162 | 163 | arm64: 164 | 165 | ``` 166 | sudo docker tag lomorage/arm64-lomorage:latest lomorage/arm64-lomorage:latest 167 | sudo docker push lomorage/arm64-lomorage:latest 168 | ``` 169 | 170 | x86/amd64: 171 | 172 | ``` 173 | sudo docker tag lomorage/amd64-lomorage:latest lomorage/amd64-lomorage:latest 174 | sudo docker push lomorage/amd64-lomorage:latest 175 | ``` 176 | -------------------------------------------------------------------------------- /clear.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker stop $(docker ps -a -q) 4 | docker rm $(docker ps -a -q) 5 | 6 | docker rmi $(docker images -a | grep none | awk '{print $3}') 7 | -------------------------------------------------------------------------------- /docker-compose.vlan.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | services: 3 | lomo: 4 | image: ${IMG} 5 | container_name: lomorage 6 | privileged: true 7 | environment: 8 | - LOMOD_DISABLE_MOUNT_MONITOR=1 9 | cap_add: 10 | - ALL 11 | volumes: 12 | - ${HOME_MEDIA_DIR}:/media/primary 13 | - ${HOME_MEDIA_BAKUP_DIR}:/media/backup 14 | - ${HOME_LOMO_DIR}:/lomo 15 | - /dev:/dev 16 | ports: 17 | - ${LOMOD_PORT}:${LOMOD_PORT} 18 | networks: 19 | lomorage: 20 | ipv4_address: ${VLAN_ADDR} 21 | command: $LOMOD_PORT 22 | 23 | watchtower: 24 | image: ${AUTO_UPDATE_IMG} 25 | container_name: watchtower 26 | restart: always 27 | volumes: 28 | - /var/run/docker.sock:/var/run/docker.sock 29 | command: lomorage --cleanup 30 | 31 | networks: 32 | lomorage: 33 | driver: ${NETWORK_TYPE} 34 | driver_opts: 35 | parent: ${NETWORK_INF} 36 | ipam: 37 | config: 38 | - subnet: ${SUBNET} 39 | gateway: ${GATEWAY} 40 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | services: 3 | lomo: 4 | image: ${IMG} 5 | container_name: lomorage 6 | privileged: true 7 | environment: 8 | - LOMOD_DISABLE_MOUNT_MONITOR=1 9 | cap_add: 10 | - ALL 11 | volumes: 12 | - ${HOME_MEDIA_DIR}:/media/primary 13 | - ${HOME_MEDIA_BAKUP_DIR}:/media/backup 14 | - ${HOME_LOMO_DIR}:/lomo 15 | - /dev:/dev 16 | ports: 17 | - ${LOMOD_PORT}:${LOMOD_PORT} 18 | command: $LOMOD_PORT 19 | 20 | watchtower: 21 | image: ${AUTO_UPDATE_IMG} 22 | container_name: watchtower 23 | restart: always 24 | volumes: 25 | - /var/run/docker.sock:/var/run/docker.sock 26 | command: lomorage --cleanup 27 | -------------------------------------------------------------------------------- /entry.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -xe 3 | 4 | if [ "$#" -lt 1 ] 5 | then 6 | echo "listen at 8000" 7 | LOMOD_PORT=8000 8 | else 9 | LOMOD_PORT=$1 10 | fi 11 | 12 | #/usr/bin/update-lomod.sh 13 | 14 | /opt/lomorage/bin/lomod -p $LOMOD_PORT -b /lomo --max-upload 1 --max-fetch-preview 3 15 | -------------------------------------------------------------------------------- /lomod.env: -------------------------------------------------------------------------------- 1 | LOMOD_DISABLE_MOUNT_MONITOR=true 2 | LOMOW_FOOT_HTML=粤ICP备168xxxxxxx号 3 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | set -x 4 | 5 | DEBUG=0 6 | AUTOUPDATE=0 7 | HOME_MEDIA_DIR=/media/primary 8 | HOME_MEDIA_BAKUP_DIR= 9 | HOME_LOMO_DIR=/home/"$USER"/lomo 10 | LOMOD_HOST_PORT=8000 11 | IMAGE_NAME="lomorage/raspberrypi-lomorage:latest" 12 | AUTO_UPDATE_IMG="containrrr/watchtower:armhf-latest" 13 | VLAN_NAME="lomorage" 14 | 15 | COMMAND_LINE_OPTIONS_HELP=" 16 | 17 | You can use either use macvlan or ipvlan which makes MDNS service discovery work. 18 | But macvlan and ipvlan are only support on Linux, so if you are on Windows or Mac, you can't use it. 19 | 20 | Command line options: 21 | -m DIR path of media directory used for media assets, default to \"$HOME_MEDIA_DIR\", optional 22 | -k DIR path of media backup directory used for media assets, default to \"$HOME_MEDIA_BAKUP_DIR\", optional 23 | -b DIR path of lomo directory used for db and log files, default to \"$HOME_LOMO_DIR\", optional 24 | -s SUBNET Subnet of the host network(like 192.168.1.0/24), required when using vlan 25 | -g GATEWAY gateway of the host network(like 192.168.1.1), required when using vlan 26 | -n NETWORK_INF network interface of the host network(like eth0), required when using vlan 27 | -t VLAN_TYPE vlan type, can be \"macvlan\" or \"ipvlan\", required when using vlan 28 | -a VLAN_ADDR vlan address to be used(like 192.168.1.99), required when using vlan 29 | -p LOMOD_PORT lomo-backend service port exposed on host machine, default to \"$LOMOD_HOST_PORT\", optional 30 | -i IMAGE_NAME docker image name, for example \"lomorage/raspberrypi-lomorage:[tag]\", default \"$IMAGE_NAME\", optional 31 | -e ENV_FILE environment variable file passed into container, optional 32 | -d Debug mode to run in foreground, default to $DEBUG, optional 33 | -u Auto upgrade lomorage docker images, default to $DEBUG, optional 34 | 35 | Examples: 36 | # assuming your hard drive mounted in /media, like /media/usb0, /media/usb0 37 | ./run.sh -m /media -b /home/pi/lomo -s 192.168.1.0/24 -g 192.168.1.1 -n eth0 -t macvlan -a 192.168.1.99 38 | 39 | # or if you don't use vlan 40 | ./run.sh -m /media -b /home/pi/lomo -h 192.168.1.99 41 | " 42 | 43 | function help() { 44 | echo "`basename $0` [-m {media-dir} -k {backup-dir} -b {lomo-dir} -d -u -p {lomod-port} -P {lomow-port} -i {image-name}] -t vlan-type -s subnet -g gateway -n network-interface -a vlan-address" 45 | echo "$COMMAND_LINE_OPTIONS_HELP" 46 | exit 3; 47 | } 48 | 49 | function createIpVlan() { 50 | sudo docker network ls | grep $VLAN_NAME 51 | if [ $? -eq 0 ]; then 52 | sudo docker network rm $VLAN_NAME 53 | fi 54 | sudo docker network create -d ipvlan -o ipvlan_mode=l2 --subnet=$1 --gateway=$2 -o parent=$3 $VLAN_NAME 55 | } 56 | 57 | function createMacVlan() { 58 | sudo docker network ls | grep $VLAN_NAME 59 | if [ $? -eq 0 ]; then 60 | sudo docker network rm $VLAN_NAME 61 | fi 62 | sudo docker network create -d macvlan --subnet=$1 --gateway=$2 -o parent=$3 $VLAN_NAME 63 | } 64 | 65 | function abspath() { 66 | [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" 67 | } 68 | 69 | OPTIONS=m:,k:,b:,i:,e:,p:,P:,s:,g:,n:,a:,t:,h:,d,u 70 | PARSED=$(getopt $OPTIONS $*) 71 | if [ $? -ne 0 ]; then 72 | echo "getopt error" 73 | exit 2 74 | fi 75 | 76 | eval set -- "$PARSED" 77 | 78 | while true; do 79 | case "$1" in 80 | -m) 81 | HOME_MEDIA_DIR=$(abspath $2) 82 | shift 2 83 | ;; 84 | -k) 85 | HOME_MEDIA_BAKUP_DIR=$(abspath $2) 86 | shift 2 87 | ;; 88 | -b) 89 | HOME_LOMO_DIR=$(abspath $2) 90 | shift 2 91 | ;; 92 | -p) 93 | LOMOD_HOST_PORT=$2 94 | shift 2 95 | ;; 96 | -i) 97 | IMAGE_NAME=$2 98 | shift 2 99 | ;; 100 | -e) 101 | ENV_FILE=$2 102 | shift 2 103 | ;; 104 | -P) 105 | echo "WARNING: -P is deprecated, lomo-web and lomod use the same port now" 106 | shift 2 107 | ;; 108 | -s) 109 | SUBNET=$2 110 | shift 2 111 | ;; 112 | -g) 113 | GATEWAY=$2 114 | shift 2 115 | ;; 116 | -n) 117 | NETWORK_INF=$2 118 | shift 2 119 | ;; 120 | -t) 121 | VLAN_TYPE=$2 122 | shift 2 123 | ;; 124 | -a) 125 | VLAN_ADDR=$2 126 | shift 2 127 | ;; 128 | -d) 129 | DEBUG=1 130 | shift 131 | ;; 132 | -u) 133 | AUTOUPDATE=1 134 | shift 135 | ;; 136 | -h) 137 | echo "WARNING:-h is deprecated, lomo-web is now integrated with lomod" 138 | shift 2 139 | ;; 140 | --) 141 | shift 142 | break 143 | ;; 144 | *) 145 | echo "ERROR: option not found!" 146 | help 147 | ;; 148 | esac 149 | done 150 | 151 | [ -z "$IMAGE_NAME" ] && echo "Docker image name required!" && help 152 | 153 | if [ "$VLAN_TYPE" != "ipvlan" ] && [ "$VLAN_TYPE" != "macvlan" ] && [ ! -z "$VLAN_TYPE" ]; then 154 | echo "vlan type should either be \"ipvlan\" or \"macvlan\" or empty" 155 | help 156 | fi 157 | 158 | if [ -z "$ENV_FILE" ]; then 159 | ENV_FILE_OPTION="" 160 | else 161 | ENV_FILE_OPTION="--env-file $ENV_FILE" 162 | fi 163 | 164 | echo "lomo-backend host port: $LOMOD_HOST_PORT" 165 | echo "Media directory: $HOME_MEDIA_DIR" 166 | echo "Media backup directory: $HOME_MEDIA_BAKUP_DIR" 167 | echo "Lomo directory: $HOME_LOMO_DIR" 168 | 169 | mkdir -p "$HOME_MEDIA_DIR" 170 | mkdir -p "$HOME_LOMO_DIR" 171 | 172 | MAP_MEDIA_PARAMS="-v $HOME_MEDIA_DIR:/media/primary" 173 | if [ -n "$HOME_MEDIA_BAKUP_DIR" ]; then 174 | mkdir -p "$HOME_MEDIA_BAKUP_DIR" 175 | MAP_MEDIA_PARAMS="-v $HOME_MEDIA_DIR:/media/primary -v $HOME_MEDIA_BAKUP_DIR:/media/backup" 176 | fi 177 | 178 | if [ "$IMAGE_NAME" != "lomorage/raspberrypi-lomorage:latest" ]; then 179 | AUTO_UPDATE_IMG="containrrr/watchtower" 180 | fi 181 | 182 | if [ $AUTOUPDATE -eq 1 ]; then 183 | sudo docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock --rm $AUTO_UPDATE_IMG lomorage --cleanup 184 | fi 185 | 186 | if [ "$VLAN_TYPE" == "ipvlan" ] || [ "$VLAN_TYPE" == "macvlan" ]; then 187 | [ -z "$SUBNET" ] && echo "Subnet required!" && help 188 | [ -z "$GATEWAY" ] && echo "Gateway required!" && help 189 | [ -z "$NETWORK_INF" ] && echo "Network interface required!" && help 190 | [ -z "$VLAN_ADDR" ] && echo "Vlan address required!" && help 191 | echo "Subnet: $SUBNET" 192 | echo "GATEWAY: $GATEWAY" 193 | echo "Network Interface: $NETWORK_INF" 194 | echo "Vlan address: $VLAN_ADDR" 195 | echo "Vlan type: $VLAN_TYPE" 196 | if [ "$VLAN_TYPE" == "ipvlan" ]; then 197 | createIpVlan $SUBNET $GATEWAY $NETWORK_INF 198 | else 199 | createMacVlan $SUBNET $GATEWAY $NETWORK_INF 200 | fi 201 | 202 | 203 | if [ $DEBUG -eq 0 ]; then 204 | sudo docker run -e LOMOD_DISABLE_MOUNT_MONITOR $ENV_FILE_OPTION --net $VLAN_NAME --ip $VLAN_ADDR --user=$UID:$(id -g $USER) -d --privileged --cap-add=ALL \ 205 | -v /dev:/dev $MAP_MEDIA_PARAMS -v "$HOME_LOMO_DIR:/lomo" --rm \ 206 | --name=lomorage $IMAGE_NAME $LOMOD_HOST_PORT 207 | else 208 | sudo docker run -e LOMOD_DISABLE_MOUNT_MONITOR $ENV_FILE_OPTION --net $VLAN_NAME --ip $VLAN_ADDR --user=$UID:$(id -g $USER) --privileged --cap-add=ALL \ 209 | -v /dev:/dev $MAP_MEDIA_PARAMS -v "$HOME_LOMO_DIR:/lomo" --rm \ 210 | --name=lomorage $IMAGE_NAME $LOMOD_HOST_PORT 211 | fi 212 | else 213 | if [ $DEBUG -eq 0 ]; then 214 | sudo docker run -e LOMOD_DISABLE_MOUNT_MONITOR $ENV_FILE_OPTION --user=$UID:$(id -g $USER) -d --privileged --cap-add=ALL -p $LOMOD_HOST_PORT:$LOMOD_HOST_PORT \ 215 | $MAP_MEDIA_PARAMS -v "$HOME_LOMO_DIR:/lomo" -v /dev:/dev --rm \ 216 | --name=lomorage $IMAGE_NAME $LOMOD_HOST_PORT 217 | else 218 | sudo docker run -e LOMOD_DISABLE_MOUNT_MONITOR $ENV_FILE_OPTION --user=$UID:$(id -g $USER) --privileged --cap-add=ALL -p $LOMOD_HOST_PORT:$LOMOD_HOST_PORT \ 219 | $MAP_MEDIA_PARAMS -v "$HOME_LOMO_DIR:/lomo" -v /dev:/dev --rm \ 220 | --name=lomorage $IMAGE_NAME $LOMOD_HOST_PORT 221 | fi 222 | fi 223 | -------------------------------------------------------------------------------- /unraid-xml/lomo-backend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lomorage 4 | lomorage/amd64-lomorage 5 | https://hub.docker.com/r/lomorage/amd64-lomorage 6 | host 7 | 8 | sh 9 | false 10 | 11 | https://github.com/lomorage/lomo-docker 12 | Lomorage enables you to backup photos / videos from any devices to your self-hosted server, and intelligently manages these personal assets via AI. Run the Lomorage server at your home, download mobile client to save the memories, and enjoy the moments. 13 | Backup: MediaApp:Video MediaApp:Photos MediaServer:Video MediaServer:Photos Status:Stable 14 | 15 | 16 | 17 | --user=99:100 18 | 192.168.1.28 8000 8001 19 | 20 | 1633893334 21 | 22 | 23 | Lomorage enables you to backup photos / videos from any devices to your self-hosted server, and intelligently manages these personal assets via AI. Run the Lomorage server at your home, download mobile client to save the memories, and enjoy the moments. 24 | 25 | host 26 | 27 | 28 | 29 | 30 | /mnt/user/ 31 | /media 32 | rw 33 | 34 | 35 | /mnt/user/appdata/ 36 | /lomo 37 | rw 38 | 39 | 40 | /etc/passwd 41 | /etc/passwd 42 | rw 43 | 44 | 45 | 46 | 47 | /mnt/user/ 48 | /mnt/user/appdata/ 49 | /etc/passwd 50 | 51 | --------------------------------------------------------------------------------