mirror of
https://asciireactor.com/otho/stashapp
synced 2024-11-22 10:15:08 +00:00
Compare commits
No commits in common. "3f83e6c02886b1c452823b0efada1245d0b63565" and "29ba3f00716363166035a8d45ac10f13ce92e58a" have entirely different histories.
3f83e6c028
...
29ba3f0071
23
README.md
23
README.md
@ -1,23 +0,0 @@
|
||||
# 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.
|
11
alpine-lts.config
Normal file
11
alpine-lts.config
Normal file
@ -0,0 +1,11 @@
|
||||
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"
|
14
alpine-setup.sh
Normal file
14
alpine-setup.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/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,8 +49,6 @@ services:
|
||||
container_name: trilium
|
||||
restart: always
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- VIRTUAL_PORT=8080
|
||||
- VIRTUAL_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
||||
- LETSENCRYPT_HOST=${stashapp_notes_domain},www.${stashapp_notes_domain}
|
||||
@ -71,10 +69,11 @@ services:
|
||||
- APPLICATION_URL=${stashapp_filestash_domain}
|
||||
- ONLYOFFICE_URL=http://onlyoffice
|
||||
volumes:
|
||||
- ./.data/filestash:/app/data
|
||||
- .data/filestash:/app/data
|
||||
networks:
|
||||
- proxy
|
||||
- onlyoffice
|
||||
|
||||
onlyoffice:
|
||||
image: ${stashapp_onlyoffice_image}
|
||||
container_name: onlyoffice
|
||||
@ -84,13 +83,12 @@ services:
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
|
||||
|
||||
archivebox:
|
||||
image: ${stashapp_archivebox_image}
|
||||
container_name: archivebox
|
||||
command: server --quick-init 0.0.0.0:8000
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- VIRTUAL_PORT=8000
|
||||
- VIRTUAL_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" {
|
||||
domain = var.stashapp_notes_domain
|
||||
record {
|
||||
hostname = "www"
|
||||
address = var.stashapp_addr
|
||||
type = "AAAA"
|
||||
}
|
||||
record {
|
||||
hostname = "www"
|
||||
address = var.stashbox_ip4_ext
|
||||
type = "A"
|
||||
}
|
||||
record {
|
||||
hostname = "@"
|
||||
type = "CNAME"
|
||||
address = "www.${var.stashapp_notes_domain}"
|
||||
}
|
||||
}
|
||||
# resource "namecheap_domain_records" "notes" {
|
||||
# domain = var.stashapp_notes_domain
|
||||
# record {
|
||||
# hostname = "www"
|
||||
# address = var.stashapp_addr
|
||||
# type = "AAAA"
|
||||
# }
|
||||
# record {
|
||||
# hostname = "www"
|
||||
# address = var.stashbox_ip4_ext
|
||||
# type = "A"
|
||||
# }
|
||||
# record {
|
||||
# hostname = "@"
|
||||
# type = "CNAME"
|
||||
# address = "www.${var.stashapp_notes_domain}"
|
||||
# }
|
||||
# }
|
||||
|
@ -1,24 +0,0 @@
|
||||
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
|
@ -1,27 +0,0 @@
|
||||
#!/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
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
loader="uefi"
|
||||
cpu=2
|
||||
memory=8G
|
||||
network0_type="virtio-net"
|
||||
network0_switch="web"
|
||||
disk0_type="nvme"
|
||||
disk0_name="disk0.img"
|
@ -3,15 +3,16 @@
|
||||
## For FreeBSD with vm-bhyve and ZFS.
|
||||
|
||||
zfs create 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 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 console stashapp
|
||||
|
||||
|
||||
## Add `vm_list="stashapp"` to rc.conf.
|
Loading…
Reference in New Issue
Block a user