remove docker version and install fixes

This commit is contained in:
A 2025-04-15 11:34:12 -07:00
parent 86b693a66a
commit d1cbb3e60b
5 changed files with 24 additions and 17 deletions

View File

@ -1,5 +1,3 @@
version: '3.8'
networks: networks:
back: back:
volumes: volumes:

View File

@ -1,5 +1,3 @@
version: '3.8'
networks: networks:
back: back:
volumes: volumes:

View File

@ -1,5 +1,3 @@
version: '3.8'
networks: networks:
back: back:
mast-int: mast-int:

View File

@ -1,5 +1,3 @@
version: '3.8'
volumes: volumes:
mau_data: mau_data:
services: services:

View File

@ -15,16 +15,19 @@ export HUB_REACHABLE=false
export TOR_AVAIL=false export TOR_AVAIL=false
i=0 i=0
echo "This script requires root access to interact with Docker. Please enter your password if prompted." echo "This script may require root access to interact with Docker."
sudo echo "" sudo echo ""
#This funciton uses which to discover what packages are installed on this system. #This funciton uses which to discover what packages are installed on this system.
#Should investigate which command has the most interoperability #Should investigate which command has the most interoperability
check_requirements () { check_requirements () {
if ! which curl docker >/dev/null; then if ! which dig curl docker >/dev/null; then
printf "${RED}## This script depends on curl and docker.\n" printf "${RED}## Some dependencies are not installed\n"
printf "Please install 'curl' and/or install docker.\n" printf "Please install:\n"
printf "https://docs.docker.com/engine/install/${NC}\n" printf "- curl\n"
printf "- dnsutils\n"
printf "- docker (https://docs.docker.com/engine/install/)\n"
printf "${NC}\n"
exit 1 exit 1
fi fi
if which torify >/dev/null; then if which torify >/dev/null; then
@ -153,7 +156,7 @@ mau_config () {
printf "${YELLOW}## Generating mau bot config${NC}\n" printf "${YELLOW}## Generating mau bot config${NC}\n"
docker run --rm --mount type=bind,src=$(readlink -f $DCOMMS_DIR/conf/mau),dst=/data dock.mau.dev/maubot/maubot:v0.3.1 1>&2 >/dev/null docker run --rm --mount type=bind,src=$(readlink -f $DCOMMS_DIR/conf/mau),dst=/data dock.mau.dev/maubot/maubot:v0.3.1 1>&2 >/dev/null
sudo chown -R $USER:$USER $DCOMMS_DIR/conf/mau sudo chown -R $USER:$USER $DCOMMS_DIR/conf/mau
MAU_PW=$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 18) MAU_PW=$(tr -dc 'A-Za-z0-9' < /dev/random | head -c 18)
printf "${RED}## Mau credentials = admin:$MAU_PW${NC}\n" printf "${RED}## Mau credentials = admin:$MAU_PW${NC}\n"
MAU_CREDS="admin:$MAU_PW" MAU_CREDS="admin:$MAU_PW"
sed -i "s/admins:/&\n admin: $MAU_PW/" $DCOMMS_DIR/conf/mau/config.yaml sed -i "s/admins:/&\n admin: $MAU_PW/" $DCOMMS_DIR/conf/mau/config.yaml
@ -216,11 +219,14 @@ main() {
D_IMAGES+=("keith/deltachat-mailadm-postfix:v0.0.3" "keith/deltachat-mailadm-dovecot:v0.0.1" "keith/deltachat-mailadm:v0.0.1") D_IMAGES+=("keith/deltachat-mailadm-postfix:v0.0.3" "keith/deltachat-mailadm-dovecot:v0.0.1" "keith/deltachat-mailadm:v0.0.1")
COMPOSE_FILES+="-f ./conf/compose/delta.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/delta.docker-compose.yml "
DELTA=true DELTA=true
DNS_RECORD="${DNS_RECORD}MX $(dig MX +short "$DWEB_DOMAIN")\n"
;; ;;
"2") "2")
D_IMAGES+=("vectorim/element-web:v1.11.88" "matrixdotorg/synapse:v1.121.1") D_IMAGES+=("vectorim/element-web:v1.11.88" "matrixdotorg/synapse:v1.121.1")
COMPOSE_FILES+="-f ./conf/compose/element.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/element.docker-compose.yml "
MATRIX=true MATRIX=true
DNS_RECORD="${DNS_RECORD}Chat $(dig +short "chat.$DWEB_DOMAIN")\n"
DNS_RECORD="${DNS_RECORD}Matrix $(dig +short "matrix.$DWEB_DOMAIN")\n"
;; ;;
"3") "3")
D_IMAGES+=("equalitie/ceno-client:v0.21.2") D_IMAGES+=("equalitie/ceno-client:v0.21.2")
@ -236,10 +242,12 @@ main() {
D_IMAGES+=("tootsuite/mastodon:v4.3.2" "redis:7.0-alpine" "postgres:14-alpine") D_IMAGES+=("tootsuite/mastodon:v4.3.2" "redis:7.0-alpine" "postgres:14-alpine")
COMPOSE_FILES+="-f ./conf/compose/mastodon.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/mastodon.docker-compose.yml "
MASTO=true MASTO=true
DNS_RECORD="${DNS_RECORD}Mastodon $(dig +short "social.$DWEB_DOMAIN")\n"
;; ;;
"6") "6")
COMPOSE_FILES+="-f ./conf/compose/peertube.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/peertube.docker-compose.yml "
PEERTUBE=true PEERTUBE=true
DNS_RECORD="${DNS_RECORD}Peertube $(dig +short "peertube.$DWEB_DOMAIN")\n"
;; ;;
*) *)
echo "Unsupported item $CHOICE!" >&2 echo "Unsupported item $CHOICE!" >&2
@ -249,12 +257,19 @@ main() {
done done
fi fi
DNS=$(whiptail --title "DNS Records" --yesno "Do these DNS records look right?\n$DNS_RECORD" 16 78 10 3>&1 1>&2 2>&3; echo $?)
if [ "$DNS" -eq "1" ]; then
printf "${RED}##DNS records are incorrect, please set them before proceeding.${NC}\n"
exit
fi
TMP_DIR_F=$(mktemp -d) TMP_DIR_F=$(mktemp -d)
trap 'rm -rf "$TMP_DIR_C"' EXIT trap 'rm -rf "$TMP_DIR_C"' EXIT
if [[ "${MAU}" == true ]] && [[ "${MATRIX}" == false ]]; then if [[ "${MAU}" == true ]] && [[ "${MATRIX}" == false ]]; then
print "${RED}##Mau is a Matrix bot. You must install Matrix as well.${NC}\n" printf "${RED}##Mau is a Matrix bot. You must install Matrix as well.${NC}\n"
exit exit
fi fi