diff --git a/src/config b/src/config index ffcd077..4b3c8e2 100644 --- a/src/config +++ b/src/config @@ -1,5 +1,5 @@ export DIST_NAME=MonsterPi -export DIST_VERSION=0.4.5 +export DIST_VERSION=0.4.5-sqlite export BASE_DISTRO=ubuntu export BASE_ARCH=aarch64 # This does not work without $BASE_IMAGE_PATH diff --git a/src/modules/monsterpi/config b/src/modules/monsterpi/config index 3badacd..0d28df5 100644 --- a/src/modules/monsterpi/config +++ b/src/modules/monsterpi/config @@ -1,9 +1,6 @@ ############################################################################### # All our config settings must start with MONSTERPI_ -# MongoDB -[ -n "$MONSTERPI_MONGODB_VERSION" ] || MONSTERPI_MONGODB_VERSION=4.4 - # Node.js [ -n "$MONSTERPI_NODEJS_VERSION" ] || MONSTERPI_NODEJS_VERSION=20.x diff --git a/src/modules/monsterpi/filesystem/home/pi/fdm-monster-daemon/install-fdm-monster.js b/src/modules/monsterpi/filesystem/home/pi/fdm-monster-daemon/install-fdm-monster.js index 4d5f8bc..78e434d 100644 --- a/src/modules/monsterpi/filesystem/home/pi/fdm-monster-daemon/install-fdm-monster.js +++ b/src/modules/monsterpi/filesystem/home/pi/fdm-monster-daemon/install-fdm-monster.js @@ -17,6 +17,20 @@ const svc = new Service({ script: join(rootPath, "dist/index.js"), nodeOptions: ["--harmony", "--max_old_space_size=4096"], workingDirectory: rootPath, + env: [ + { + name: "ENABLE_EXPERIMENTAL_TYPEORM", + value: "true", + }, + { + name: "DATABASE_PATH", + value: "./database", + }, + { + name: "DATABASE_FILE", + value: "fdm-monster.sqlite", + }, + ], }); svc.on("install", function () { diff --git a/src/modules/monsterpi/start_chroot_script b/src/modules/monsterpi/start_chroot_script index 5082cc5..55e4889 100644 --- a/src/modules/monsterpi/start_chroot_script +++ b/src/modules/monsterpi/start_chroot_script @@ -1,6 +1,6 @@ #!/usr/bin/env bash # start_chroot_script -# This installs MongoDB as well as FDM Monster and HAProxy +# This installs FDM Monster and HAProxy # Written by David Zwart # GPL V3 ######## @@ -45,7 +45,7 @@ else fi # Install GPG -apt install -y gnupg +# apt install -y gnupg # Install Node.js based on MONSTERPI_NODEJS_VERSION curl -sL https://deb.nodesource.com/setup_$MONSTERPI_NODEJS_VERSION | bash - @@ -68,16 +68,6 @@ pushd /home/"${BASE_USER}" fi popd -# Add MongoDB as trusted source list -wget -qO - https://www.mongodb.org/static/pgp/server-"$MONSTERPI_MONGODB_VERSION".asc | sudo apt-key add - -echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/`cat /etc/os-release | grep "^ID=" | cut -d "=" -f2` `cat /etc/os-release | grep "^VERSION_CODENAME=" | cut -d "=" -f2`/mongodb-org/$MONSTERPI_MONGODB_VERSION multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$MONSTERPI_MONGODB_VERSION.list -apt update - -# Install MongoDB -sudo apt install -y mongodb-org=4.4.15 mongodb-org-server=4.4.15 mongodb-org-shell=4.4.15 mongodb-org-mongos=4.4.15 mongodb-org-tools=4.4.15 -systemctl enable mongod -systemctl start mongod - # add some "How To" info to boot output # Note, this code is also in /filesystem/home/pi/scripts/ sed -i 's@exit 0@@' /etc/rc.local