Add cloudcmd + supysonic

This commit is contained in:
Vivian Lim 2019-12-30 18:08:56 -08:00
parent 0512f46754
commit 9b68313f22
6 changed files with 73 additions and 3 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
beets/musiclibrary.db
beets/state.pickle
supysonic_pg

View File

@ -22,7 +22,7 @@ RUN pacman -Syu --noconfirm \
# delete user's password so sudo won't prompt for it # delete user's password so sudo won't prompt for it
&& passwd -d vivlim \ && passwd -d vivlim \
# basic tools # basic tools
&& pacman -S vim git zsh base-devel man-db tmux vi base iputils inotify-tools python-pipenv youtube-dl beets --noconfirm \ && pacman -S vim git zsh base-devel man-db tmux vi base iputils inotify-tools python-pipenv youtube-dl ffmpeg npm beets --noconfirm \
# install an aur helper # install an aur helper
&& cd /tmp \ && cd /tmp \
&& git clone https://aur.archlinux.org/yay.git \ && git clone https://aur.archlinux.org/yay.git \
@ -34,6 +34,11 @@ RUN pacman -Syu --noconfirm \
# clean cache # clean cache
&& pacman -Scc --noconfirm && pacman -Scc --noconfirm
RUN npm install -g cloudcmd
# installing gritty requires root
RUN npm install -g gritty --unsafe
# oh-my-zsh # oh-my-zsh
RUN su vivlim -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) --unattended" \ RUN su vivlim -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) --unattended" \
&& chsh -s /usr/bin/zsh vivlim && chsh -s /usr/bin/zsh vivlim

View File

@ -1,4 +1,4 @@
version: '3' version: '3.2'
services: services:
arch: arch:
build: . build: .
@ -15,9 +15,18 @@ services:
- ./beets:/home/vivlim/.config/beets - ./beets:/home/vivlim/.config/beets
- home:/home/vivlim - home:/home/vivlim
- ssh_server_keys:/etc/ssh/keys - ssh_server_keys:/etc/ssh/keys
-
type: bind
source: "/net/192.168.1.107/depths"
target: "/home/vivlim/depths"
read_only: true
bind:
propagation: rshared
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8322:22" - "8322:22"
networks:
- frontend
ampache: ampache:
image: jgoerzen/ampache-mysql image: jgoerzen/ampache-mysql
container_name: ampache container_name: ampache
@ -40,6 +49,36 @@ services:
- "8932:80" - "8932:80"
environment: environment:
- DEBBASE_NO_STARTUP_APT=yes - DEBBASE_NO_STARTUP_APT=yes
supysonic:
image: 'speranza/supysonic-pg'
container_name: 'supysonic'
restart: 'unless-stopped'
networks:
- frontend
- backend
environment:
- PUID=1000
- PGID=1000
volumes:
- './supysonic.conf:/etc/supysonic'
- '/mnt/big/vivlim/beets-library:/media'
ports:
- 8000:8000
postgres:
image: postgres:10.5
container_name: supysonic_postgres
hostname: supysonic_postgres
restart: always
networks:
- backend
volumes:
- ./supysonic_pg/data:/var/lib/postgresql/data
- ./supysonic_pg/postgres.conf:/etc/postgres.conf
- ./supysonic_pg/pg_hba.conf:/etc/pg_hba.conf
command: postgres -c config_file=/etc/postgres.conf
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes: volumes:
ssh_server_keys: ssh_server_keys:
@ -49,4 +88,5 @@ volumes:
networks: networks:
frontend: frontend:
external: external:
name: ingress_frontend name: ingress_frontend
backend:

2
scan.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker-compose exec supysonic supysonic-cli folder scan

17
supysonic.conf Normal file
View File

@ -0,0 +1,17 @@
[base]
; A database URI. See the 'schema' folder for schema creation scripts
database_uri = postgres://postgres:postgres@supysonic_postgres/supysonic
[daemon]
; Socket file the daemon will listen on for incoming management commands
; Default: /tmp/supysonic/supysonic.sock
socket = /tmp/supysonic.sock
; Defines if the file watcher should be started. Default: yes
run_watcher = yes
; Delay before triggering scanning operation after a change have been detected
; This prevents running too many scans when multiple changes are detected for a
; single file over a short time span. Default: 5
wait_delay = 5

View File

@ -22,3 +22,6 @@ if [ $? == 0 ]; then
echo "No password is set. You will be prompted for one when you connect." echo "No password is set. You will be prompted for one when you connect."
tmux send-keys -t 1 "passwd vivlim" C-m tmux send-keys -t 1 "passwd vivlim" C-m
fi fi
# start cloudcmd
cloudcmd --terminal --terminal-path `gritty --path` &