2023-07-18 02:50:17 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# check output of userdata script with sudo tail -f /var/log/cloud-init-output.log
|
|
|
|
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y docker.io
|
|
|
|
sudo usermod -a -G docker ubuntu
|
|
|
|
|
|
|
|
sudo systemctl enable docker
|
|
|
|
sudo systemctl start docker
|
|
|
|
|
2023-12-14 04:55:23 +01:00
|
|
|
mkdir -p /home/anythingllm
|
|
|
|
touch /home/anythingllm/.env
|
2023-07-18 02:50:17 +02:00
|
|
|
|
2023-12-14 04:55:23 +01:00
|
|
|
sudo docker pull mintplexlabs/anythingllm:master
|
2023-12-15 00:14:56 +01:00
|
|
|
sudo docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v /home/anythingllm:/app/server/storage -v /home/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm:master
|
2023-07-18 02:50:17 +02:00
|
|
|
echo "Container ID: $(sudo docker ps --latest --quiet)"
|
|
|
|
|
|
|
|
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
|
|
|
|
echo "Health check: $ONLINE"
|
|
|
|
echo "Setup complete! AnythingLLM instance is now online!"
|