mirror of
https://asciireactor.com/otho/stashapp
synced 2024-11-22 05:05:07 +00:00
Compare commits
3 Commits
29ba3f0071
...
3f83e6c028
Author | SHA1 | Date | |
---|---|---|---|
3f83e6c028 | |||
6ce86e0937 | |||
97e6514111 |
23
README.md
Normal file
23
README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Stashapp
|
||||||
|
|
||||||
|
Companion app to the stashbox.
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
### Trilium Notes
|
||||||
|
|
||||||
|
Personal, customizable knowledgebase system using CKEditor.
|
||||||
|
|
||||||
|
### Archivebox
|
||||||
|
|
||||||
|
Archive web content.
|
||||||
|
|
||||||
|
### Filestash (experimental)
|
||||||
|
|
||||||
|
Middleware providing file browsing and sharing plus onlyoffice.
|
||||||
|
|
||||||
|
## Ephemeral Deployment
|
||||||
|
There is an alternative approach where I could use the
|
||||||
|
Alpine LBU and the `vm install` command to run a complete
|
||||||
|
ephemeral deployment each time the vm starts up. I may
|
||||||
|
look into that, but for now I'm using the sys disk type.
|
@ -1,11 +0,0 @@
|
|||||||
loader="grub"
|
|
||||||
cpu=2
|
|
||||||
memory=8G
|
|
||||||
network0_type="virtio-net"
|
|
||||||
network0_switch="feed"
|
|
||||||
disk0_type="nvme"
|
|
||||||
disk0_name="disk0.img"
|
|
||||||
grub_install0="linux /boot/vmlinuz-lts initrd=/boot/initramfs-lts alpine_dev=cdrom:iso9660 modules=loop,squashfs,sd-mod,usb-storage,sr-mod"
|
|
||||||
grub_install1="initrd /boot/initramfs-lts"
|
|
||||||
grub_run0="linux /boot/vmlinuz-lts root=/dev/vda3 modules=ext4"
|
|
||||||
grub_run1="initrd /boot/initramfs-lts"
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cp /etc/apk/repositories /root/repositories.backup
|
|
||||||
sed 's/^#\(.\+v3.19/community\)$/\1/' /etc/apk/repositories > /root/repositories.edited
|
|
||||||
chmod 644 /root/repositories.edited
|
|
||||||
mv /root/repositories.edited /etc/apk/repositories
|
|
||||||
|
|
||||||
apk add --update \
|
|
||||||
git \
|
|
||||||
docker \
|
|
||||||
docker-compose
|
|
||||||
|
|
||||||
service docker start
|
|
||||||
rc-update add docker boot
|
|
@ -49,6 +49,8 @@ services:
|
|||||||
container_name: trilium
|
container_name: trilium
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
- VIRTUAL_PORT=8080
|
- VIRTUAL_PORT=8080
|
||||||
- VIRTUAL_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
- VIRTUAL_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
||||||
- LETSENCRYPT_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
- LETSENCRYPT_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
||||||
@ -69,11 +71,10 @@ services:
|
|||||||
- APPLICATION_URL=${stashapp_filestash_domain}
|
- APPLICATION_URL=${stashapp_filestash_domain}
|
||||||
- ONLYOFFICE_URL=http://onlyoffice
|
- ONLYOFFICE_URL=http://onlyoffice
|
||||||
volumes:
|
volumes:
|
||||||
- .data/filestash:/app/data
|
- ./.data/filestash:/app/data
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
- onlyoffice
|
- onlyoffice
|
||||||
|
|
||||||
onlyoffice:
|
onlyoffice:
|
||||||
image: ${stashapp_onlyoffice_image}
|
image: ${stashapp_onlyoffice_image}
|
||||||
container_name: onlyoffice
|
container_name: onlyoffice
|
||||||
@ -83,12 +84,13 @@ services:
|
|||||||
security_opt:
|
security_opt:
|
||||||
- seccomp:unconfined
|
- seccomp:unconfined
|
||||||
|
|
||||||
|
|
||||||
archivebox:
|
archivebox:
|
||||||
image: ${stashapp_archivebox_image}
|
image: ${stashapp_archivebox_image}
|
||||||
container_name: archivebox
|
container_name: archivebox
|
||||||
command: server --quick-init 0.0.0.0:8000
|
command: server --quick-init 0.0.0.0:8000
|
||||||
environment:
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
- VIRTUAL_PORT=8000
|
- VIRTUAL_PORT=8000
|
||||||
- VIRTUAL_HOST=${stashapp_archivebox_domain}
|
- VIRTUAL_HOST=${stashapp_archivebox_domain}
|
||||||
- LETSENCRYPT_HOST=${stashapp_archivebox_domain}
|
- LETSENCRYPT_HOST=${stashapp_archivebox_domain}
|
||||||
|
36
dns.tf
36
dns.tf
@ -62,21 +62,21 @@ resource "namecheap_domain_records" "stash" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# resource "namecheap_domain_records" "notes" {
|
resource "namecheap_domain_records" "notes" {
|
||||||
# domain = var.stashapp_notes_domain
|
domain = var.stashapp_notes_domain
|
||||||
# record {
|
record {
|
||||||
# hostname = "www"
|
hostname = "www"
|
||||||
# address = var.stashapp_addr
|
address = var.stashapp_addr
|
||||||
# type = "AAAA"
|
type = "AAAA"
|
||||||
# }
|
}
|
||||||
# record {
|
record {
|
||||||
# hostname = "www"
|
hostname = "www"
|
||||||
# address = var.stashbox_ip4_ext
|
address = var.stashbox_ip4_ext
|
||||||
# type = "A"
|
type = "A"
|
||||||
# }
|
}
|
||||||
# record {
|
record {
|
||||||
# hostname = "@"
|
hostname = "@"
|
||||||
# type = "CNAME"
|
type = "CNAME"
|
||||||
# address = "www.${var.stashapp_notes_domain}"
|
address = "www.${var.stashapp_notes_domain}"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
24
setup-alpine.answers
Normal file
24
setup-alpine.answers
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
KEYMAPOPTS="us us"
|
||||||
|
HOSTNAMEOPTS="-n app.othostash.com"
|
||||||
|
INTERFACESOPTS="auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet static
|
||||||
|
address 10.1.9.11
|
||||||
|
netmask 255.255.255.0
|
||||||
|
gateway 10.1.9.1
|
||||||
|
iface eth0 inet6 static
|
||||||
|
address 2603:3015:1003:562d::dad:beef
|
||||||
|
gateway 2603:3015:1003:562d::cab:0
|
||||||
|
"
|
||||||
|
DNSOPTS="-d othostash.com 2603:3015:1003:5621::deed:feed 2001:558:feed::1 2001:558:feed::2"
|
||||||
|
TIMEZONEOPTS="-z UTC"
|
||||||
|
PROXYOPTS=none
|
||||||
|
APKREPOSOPTS="-c1"
|
||||||
|
# Doesn't work.
|
||||||
|
#USEROPTS="-a -u -g audio,video,netdev -k 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDbhgdQui6flN1dXig81JYyWwvmD6ezwCwxHUgAwmNq+ul/hrR49A5twvEDwgSfFnkTW+ZcMHnUZPK2isbxblfKQAIybdeAZecPGaFwVx3Aktr34/ZTyt+NOPxEuPNE+IK1vDhYWLjEBlboPElqC7SQsXzrpRtusfApTIABIoP9JM9Q4n1bsHg8748Y+kXJ5Mf7trW1WCC5lw+8fOvJysI7u5iOWlIf0k7RQedaGZoMtLzxwntEyeve5vnyGQsKHVqmRyHWVWYTf5ZMktquQ0wiK0ua9keGS/iipTlNj4p5uQnnp5oS11sbiHpVy3WJaSt9BMxfg0zmBsH0EH5f6fxpgxYvajEND4UjBsBJ9Du/oMNLzrlExprLte6+TyBKrofe7oU38dbT+xE9TMbBgrryDi87e+xVjEiv/5WYJMyquQxx+cFz3BIv1AhfhiuPlR02YqfTdqkQKgKYDkhfxQ/9ZjZL49+Sr/sSuyt+3y9E/pR/iDLf6l4UknOQKH0o2RE= adamo@threadbox' caes"
|
||||||
|
SSHDOPTS="-c openssh"
|
||||||
|
NTPOPTS="-c openntpd"
|
||||||
|
DISKOPTS="-s 16384 -m sys /dev/nvme0n1"
|
||||||
|
LBUOPTS=none
|
||||||
|
APKCACHEOPTS=none
|
27
setup-alpine.sh
Normal file
27
setup-alpine.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "# Copypaste your answers into this file" > setup-alpine.answers
|
||||||
|
vi setup-alpine.answers
|
||||||
|
cat setup-alpine.answers
|
||||||
|
setup-alpine -f setup-alpine.answers
|
||||||
|
## /mnt/boot is device /dev/nvme0n1p1
|
||||||
|
reboot
|
||||||
|
|
||||||
|
apk add --update git docker docker-compose rsync tmux
|
||||||
|
|
||||||
|
# mount -t tmpfs cgroup_root /sys/fs/cgroup
|
||||||
|
# mkdir -p /sys/fs/cgroup/devices
|
||||||
|
# mount -t cgroup -o devices cgroup /sys/fs/cgroup/devices
|
||||||
|
|
||||||
|
echo "
|
||||||
|
cgroup_root /sys/fs/cgroup tmpfs defaults 0 0
|
||||||
|
cgroup /sys/fs/cgroup/devices cgroup defaults,devices 0 0
|
||||||
|
" >> /etc/fstab
|
||||||
|
mount /sys/fs/cgroup
|
||||||
|
mkdir -p /sys/fs/cgroup/devices
|
||||||
|
mount /sys/fs/cgroup/devices
|
||||||
|
|
||||||
|
service docker start
|
||||||
|
rc-update add docker boot
|
||||||
|
setup-user -a -u -g audio,video,netdev,docker -k 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDbhgdQui6flN1dXig81JYyWwvmD6ezwCwxHUgAwmNq+ul/hrR49A5twvEDwgSfFnkTW+ZcMHnUZPK2isbxblfKQAIybdeAZecPGaFwVx3Aktr34/ZTyt+NOPxEuPNE+IK1vDhYWLjEBlboPElqC7SQsXzrpRtusfApTIABIoP9JM9Q4n1bsHg8748Y+kXJ5Mf7trW1WCC5lw+8fOvJysI7u5iOWlIf0k7RQedaGZoMtLzxwntEyeve5vnyGQsKHVqmRyHWVWYTf5ZMktquQ0wiK0ua9keGS/iipTlNj4p5uQnnp5oS11sbiHpVy3WJaSt9BMxfg0zmBsH0EH5f6fxpgxYvajEND4UjBsBJ9Du/oMNLzrlExprLte6+TyBKrofe7oU38dbT+xE9TMbBgrryDi87e+xVjEiv/5WYJMyquQxx+cFz3BIv1AhfhiuPlR02YqfTdqkQKgKYDkhfxQ/9ZjZL49+Sr/sSuyt+3y9E/pR/iDLf6l4UknOQKH0o2RE= adamo@threadbox' caes
|
||||||
|
|
||||||
|
|
@ -3,16 +3,15 @@
|
|||||||
## For FreeBSD with vm-bhyve and ZFS.
|
## For FreeBSD with vm-bhyve and ZFS.
|
||||||
|
|
||||||
zfs create data/vm
|
zfs create data/vm
|
||||||
|
|
||||||
vm datastore add stashvm zfs:data/vm
|
vm datastore add stashvm zfs:data/vm
|
||||||
vm create -d stashvm -t alpine -s 1T -m 8G -c 2 stashapp
|
|
||||||
## Add `vm_list="stashapp"` to rc.conf.
|
|
||||||
|
|
||||||
vm switch create feed
|
vm switch create feed
|
||||||
vm switch add feed re1
|
vm switch add feed re1
|
||||||
## Update network in /data/vm/stashapp/stashapp.conf
|
|
||||||
|
|
||||||
## Change disk type to "nvme" in stashapp.conf
|
|
||||||
|
|
||||||
|
vm create -d stashvm -t alpine-lts -s 1T stashapp
|
||||||
vm install stashapp /zroot/vm/.iso/alpine-standard-3.19.1-x86_64.iso
|
vm install stashapp /zroot/vm/.iso/alpine-standard-3.19.1-x86_64.iso
|
||||||
vm console stashapp
|
vm console stashapp
|
||||||
|
|
||||||
|
|
||||||
|
## Add `vm_list="stashapp"` to rc.conf.
|
7
uefi-web.conf
Normal file
7
uefi-web.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
loader="uefi"
|
||||||
|
cpu=2
|
||||||
|
memory=8G
|
||||||
|
network0_type="virtio-net"
|
||||||
|
network0_switch="web"
|
||||||
|
disk0_type="nvme"
|
||||||
|
disk0_name="disk0.img"
|
Loading…
Reference in New Issue
Block a user