mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-10-02 08:50:11 +02:00
docs: update deployment templates to just pull the docker image (#445)
docs: update deployment templates to just pull the docker image and boot that instead of building
This commit is contained in:
parent
cc3343ba79
commit
d094cc3c10
@ -80,10 +80,10 @@ These instructions are for CLI configuration and assume you are logged in to EC2
|
|||||||
1. $sudo certbot --nginx -d [Insert FQDN here]
|
1. $sudo certbot --nginx -d [Insert FQDN here]
|
||||||
Example command: $sudo certbot --nginx -d anythingllm.exampleorganization.org
|
Example command: $sudo certbot --nginx -d anythingllm.exampleorganization.org
|
||||||
This command will generate the appropriate certificate files, write the files to /etc/letsencrypt/live/yourFQDN, and make updates to the nginx
|
This command will generate the appropriate certificate files, write the files to /etc/letsencrypt/live/yourFQDN, and make updates to the nginx
|
||||||
configuration file for anythingllm locdated at /etc/nginx/conf.d/anything.llm
|
configuration file for anythingllm located at /etc/nginx/conf.d/anything.llm
|
||||||
3. Enter the email address you would like to use for updates.
|
3. Enter the email address you would like to use for updates.
|
||||||
4. Accept the terms of service.
|
4. Accept the terms of service.
|
||||||
5. Accept or decline to recieve communication from letsencrypt.
|
5. Accept or decline to receive communication from LetsEncrypt.
|
||||||
|
|
||||||
## Step 10: Test Cert installation
|
## Step 10: Test Cert installation
|
||||||
1. $sudo cat /etc/nginx/conf.d/anything.conf
|
1. $sudo cat /etc/nginx/conf.d/anything.conf
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"InstanceType": {
|
"InstanceType": {
|
||||||
"Description": "EC2 instance type",
|
"Description": "EC2 instance type",
|
||||||
"Type": "String",
|
"Type": "String",
|
||||||
"Default": "t2.small"
|
"Default": "t3.small"
|
||||||
},
|
},
|
||||||
"InstanceVolume": {
|
"InstanceVolume": {
|
||||||
"Description": "Storage size of disk on Instance in GB",
|
"Description": "Storage size of disk on Instance in GB",
|
||||||
@ -83,28 +83,16 @@
|
|||||||
"#!/bin/bash\n",
|
"#!/bin/bash\n",
|
||||||
"# check output of userdata script with sudo tail -f /var/log/cloud-init-output.log\n",
|
"# check output of userdata script with sudo tail -f /var/log/cloud-init-output.log\n",
|
||||||
"sudo yum install docker -y\n",
|
"sudo yum install docker -y\n",
|
||||||
"sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\n",
|
|
||||||
"sudo chmod +x /usr/local/bin/docker-compose\n",
|
|
||||||
"sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose\n",
|
|
||||||
"sudo systemctl enable docker\n",
|
"sudo systemctl enable docker\n",
|
||||||
"sudo systemctl start docker\n",
|
"sudo systemctl start docker\n",
|
||||||
"sudo yum install git -y\n",
|
"mkdir -p /home/ec2-user/anythingllm\n",
|
||||||
"git clone https://github.com/Mintplex-Labs/anything-llm.git /home/ec2-user/anything-llm\n",
|
"touch /home/ec2-user/anythingllm/.env\n",
|
||||||
"touch /home/ec2-user/anything-llm/server/storage/anythingllm.db\n",
|
"sudo chown ec2-user:ec2-user -R /home/ec2-user/anythingllm\n",
|
||||||
"cd /home/ec2-user/anything-llm/docker\n",
|
"docker pull mintplexlabs/anythingllm:master\n",
|
||||||
"cp .env.example .env\n",
|
"docker run -d -p 3001:3001 -v /home/ec2-user/anythingllm:/app/server/storage -v /home/ec2-user/anythingllm/.env:/app/server/.env -e STORAGE_DIR=\"/app/server/storage\" mintplexlabs/anythingllm:master\n",
|
||||||
"cd ../frontend\n",
|
|
||||||
"rm -rf .env.production\n",
|
|
||||||
"cat >> .env.production << \"END\"\n",
|
|
||||||
"GENERATE_SOURCEMAP=true\n",
|
|
||||||
"VITE_API_BASE=\"/api\"\n",
|
|
||||||
"END\n",
|
|
||||||
"sudo chown ec2-user:ec2-user -R /home/ec2-user/anything-llm\n",
|
|
||||||
"sudo docker-compose -f /home/ec2-user/anything-llm/docker/docker-compose.yml up -d\n",
|
|
||||||
"echo \"Container ID: $(sudo docker ps --latest --quiet)\"\n",
|
"echo \"Container ID: $(sudo docker ps --latest --quiet)\"\n",
|
||||||
"export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)\n",
|
"export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)\n",
|
||||||
"echo \"Health check: $ONLINE\"\n",
|
"echo \"Health check: $ONLINE\"\n",
|
||||||
"if [ \"$ONLINE\" = 200 ] ; then echo \"Running migrations...\" && curl -Is http://localhost:3001/api/migrate | head -n 1|cut -d$' ' -f2; fi\n",
|
|
||||||
"echo \"Setup complete! AnythingLLM instance is now online!\"\n",
|
"echo \"Setup complete! AnythingLLM instance is now online!\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"--//--\n"
|
"--//--\n"
|
||||||
|
@ -19,7 +19,7 @@ resource "digitalocean_droplet" "anything_llm_instance" {
|
|||||||
image = "ubuntu-22-10-x64"
|
image = "ubuntu-22-10-x64"
|
||||||
name = "anything-llm-instance"
|
name = "anything-llm-instance"
|
||||||
region = "nyc3"
|
region = "nyc3"
|
||||||
size = "s-1vcpu-1gb"
|
size = "s-2vcpu-2gb"
|
||||||
|
|
||||||
user_data = templatefile("user_data.tp1", {
|
user_data = templatefile("user_data.tp1", {
|
||||||
env_content = local.formatted_env_content
|
env_content = local.formatted_env_content
|
||||||
|
@ -5,55 +5,16 @@ sudo apt-get update
|
|||||||
sudo apt-get install -y docker.io
|
sudo apt-get install -y docker.io
|
||||||
sudo usermod -a -G docker ubuntu
|
sudo usermod -a -G docker ubuntu
|
||||||
|
|
||||||
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
|
||||||
sudo chmod +x /usr/local/bin/docker-compose
|
|
||||||
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
|
||||||
|
|
||||||
sudo systemctl enable docker
|
sudo systemctl enable docker
|
||||||
sudo systemctl start docker
|
sudo systemctl start docker
|
||||||
|
|
||||||
sudo apt-get install -y git
|
mkdir -p /home/anythingllm
|
||||||
|
touch /home/anythingllm/.env
|
||||||
|
|
||||||
git clone https://github.com/Mintplex-Labs/anything-llm.git /home/anything-llm
|
sudo docker pull mintplexlabs/anythingllm:master
|
||||||
cd /home/anything-llm/docker
|
sudo docker run -d -p 3001:3001 -v /home/anythingllm:/app/server/storage -v /home/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm:master
|
||||||
|
|
||||||
cat >> .env << END
|
|
||||||
${env_content}
|
|
||||||
UID="1000"
|
|
||||||
GID="1000"
|
|
||||||
NO_DEBUG="true"
|
|
||||||
END
|
|
||||||
|
|
||||||
echo "Set .env file"
|
|
||||||
|
|
||||||
cd ../frontend
|
|
||||||
sudo rm -rf .env.production
|
|
||||||
|
|
||||||
sudo cat >> .env.production << END
|
|
||||||
GENERATE_SOURCEMAP=true
|
|
||||||
VITE_API_BASE="/api"
|
|
||||||
END
|
|
||||||
|
|
||||||
echo "Set .env.production file"
|
|
||||||
|
|
||||||
cd ../docker
|
|
||||||
sudo docker-compose up -d --build
|
|
||||||
echo "Container ID: $(sudo docker ps --latest --quiet)"
|
echo "Container ID: $(sudo docker ps --latest --quiet)"
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) mkdir -p /app/server/storage /app/server/storage/documents /app/server/storage/vector-cache /app/server/storage/lancedb
|
|
||||||
echo "Placeholder folders in storage created."
|
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) touch /app/server/storage/anythingllm.db
|
|
||||||
echo "SQLite DB placeholder set."
|
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) chown -R anythingllm:anythingllm /app/collector /app/server
|
|
||||||
echo "File permissions corrected."
|
|
||||||
|
|
||||||
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
|
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
|
||||||
echo "Health check: $ONLINE"
|
echo "Health check: $ONLINE"
|
||||||
|
|
||||||
if [ "$ONLINE" = 200 ]; then
|
|
||||||
echo "Running migrations..." && curl -Is http://localhost:3001/api/migrate | head -n 1 | cut -d$' ' -f2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Setup complete! AnythingLLM instance is now online!"
|
echo "Setup complete! AnythingLLM instance is now online!"
|
||||||
|
@ -51,7 +51,7 @@ gcloud deployment-manager deployments delete anything-llm-deployment
|
|||||||
## Please read this notice before submitting issues about your deployment
|
## Please read this notice before submitting issues about your deployment
|
||||||
|
|
||||||
**Note:**
|
**Note:**
|
||||||
Your instance will not be available instantly. Depending on the instance size you launched with it can take anywhere from 10-20 minutes to fully boot up.
|
Your instance will not be available instantly. Depending on the instance size you launched with it can take anywhere from 5-10 minutes to fully boot up.
|
||||||
|
|
||||||
If you want to check the instances progress, navigate to [your deployed instances](https://console.cloud.google.com/compute/instances) and connect to your instance via SSH in browser.
|
If you want to check the instances progress, navigate to [your deployed instances](https://console.cloud.google.com/compute/instances) and connect to your instance via SSH in browser.
|
||||||
|
|
||||||
|
@ -27,57 +27,18 @@ resources:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y docker.io
|
sudo apt-get install -y docker.io
|
||||||
sudo usermod -a -G docker ubuntu
|
sudo usermod -a -G docker ubuntu
|
||||||
|
|
||||||
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
|
||||||
sudo chmod +x /usr/local/bin/docker-compose
|
|
||||||
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
|
||||||
|
|
||||||
sudo systemctl enable docker
|
sudo systemctl enable docker
|
||||||
sudo systemctl start docker
|
sudo systemctl start docker
|
||||||
|
|
||||||
sudo apt-get install -y git
|
mkdir -p /home/anythingllm
|
||||||
|
touch /home/anythingllm/.env
|
||||||
git clone https://github.com/Mintplex-Labs/anything-llm.git /home/anything-llm
|
|
||||||
cd /home/anything-llm/docker
|
sudo docker pull mintplexlabs/anythingllm:master
|
||||||
|
sudo docker run -d -p 3001:3001 -v /home/anythingllm:/app/server/storage -v /home/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm:master
|
||||||
cat >> .env << END
|
|
||||||
!SUB::USER::CONTENT!
|
|
||||||
UID="1000"
|
|
||||||
GID="1000"
|
|
||||||
NO_DEBUG="true"
|
|
||||||
END
|
|
||||||
|
|
||||||
echo "Set .env file"
|
|
||||||
|
|
||||||
cd ../frontend
|
|
||||||
sudo rm -rf .env.production
|
|
||||||
|
|
||||||
sudo cat >> .env.production << END
|
|
||||||
GENERATE_SOURCEMAP=true
|
|
||||||
VITE_API_BASE="/api"
|
|
||||||
END
|
|
||||||
|
|
||||||
echo "Set .env.production file"
|
|
||||||
|
|
||||||
cd ../docker
|
|
||||||
sudo docker-compose up -d --build
|
|
||||||
echo "Container ID: $(sudo docker ps --latest --quiet)"
|
echo "Container ID: $(sudo docker ps --latest --quiet)"
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) mkdir -p /app/server/storage /app/server/storage/documents /app/server/storage/vector-cache /app/server/storage/lancedb
|
|
||||||
echo "Placeholder folders in storage created."
|
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) touch /app/server/storage/anythingllm.db
|
|
||||||
echo "SQLite DB placeholder set."
|
|
||||||
|
|
||||||
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) chown -R anythingllm:anythingllm /app/collector /app/server
|
|
||||||
echo "File permissions corrected."
|
|
||||||
|
|
||||||
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
|
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
|
||||||
echo "Health check: $ONLINE"
|
echo "Health check: $ONLINE"
|
||||||
|
|
||||||
if [ "$ONLINE" = 200 ]; then
|
|
||||||
echo "Running migrations..." && curl -Is http://localhost:3001/api/migrate | head -n 1 | cut -d$' ' -f2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Setup complete! AnythingLLM instance is now online!"
|
echo "Setup complete! AnythingLLM instance is now online!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user