diff --git a/alpine-lts.config b/alpine-lts.config deleted file mode 100644 index 3e1330c..0000000 --- a/alpine-lts.config +++ /dev/null @@ -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" diff --git a/alpine-setup.sh b/alpine-setup.sh deleted file mode 100644 index 7caf3a7..0000000 --- a/alpine-setup.sh +++ /dev/null @@ -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 diff --git a/compose.yml b/compose.yml index 460f925..45119e3 100644 --- a/compose.yml +++ b/compose.yml @@ -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 diff --git a/dns.tf b/dns.tf index 301dfa2..93594b3 100644 --- a/dns.tf +++ b/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}" + } +} diff --git a/setup-alpine.answers b/setup-alpine.answers new file mode 100644 index 0000000..bdaf404 --- /dev/null +++ b/setup-alpine.answers @@ -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 diff --git a/setup-alpine.sh b/setup-alpine.sh new file mode 100644 index 0000000..912ca46 --- /dev/null +++ b/setup-alpine.sh @@ -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 + diff --git a/vm-setup.sh b/setup-bhyve.sh similarity index 56% rename from vm-setup.sh rename to setup-bhyve.sh index a3cb42f..5e13eb4 100644 --- a/vm-setup.sh +++ b/setup-bhyve.sh @@ -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. \ No newline at end of file diff --git a/uefi.conf b/uefi.conf new file mode 100644 index 0000000..561068a --- /dev/null +++ b/uefi.conf @@ -0,0 +1,7 @@ +loader="uefi" +cpu=2 +memory=8G +network0_type="virtio-net" +network0_switch="web" +disk0_type="nvme" +disk0_name="disk0.img"