This commit is contained in:
Otho 2024-02-25 13:30:43 -05:00
parent 29ba3f0071
commit 97e6514111
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9
8 changed files with 81 additions and 52 deletions

View File

@ -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"

View File

@ -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

View File

@ -48,7 +48,9 @@ services:
image: ${stashapp_trilium_image}
container_name: trilium
restart: always
environment:
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}
@ -69,11 +71,10 @@ 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
@ -83,7 +84,6 @@ services:
security_opt:
- seccomp:unconfined
archivebox:
image: ${stashapp_archivebox_image}
container_name: archivebox

36
dns.tf
View File

@ -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}"
}
}

23
setup-alpine.answers Normal file
View File

@ -0,0 +1,23 @@
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"
USEROPTS="no"
SSHDOPTS="-c openssh"
NTPOPTS="-c openntpd"
DISKOPTS="-s 16384 -m sys /dev/nvme0n1"
LBUOPTS=none
APKCACHEOPTS=none

25
setup-alpine.sh Normal file
View File

@ -0,0 +1,25 @@
#!/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
# 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
mount /sys/fs/cgroup/devices
service docker start
rc-update add docker boot
setup-user -a -a -u -g audio,video,netdev,docker caes

View File

@ -3,16 +3,15 @@
## 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.

7
uefi.conf Normal file
View 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"