Skip to content

Commit d094cc3

Browse files
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
1 parent cc3343b commit d094cc3

File tree

6 files changed

+19
-109
lines changed

6 files changed

+19
-109
lines changed

cloud-deployments/aws/cloudformation/aws_https_instructions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ These instructions are for CLI configuration and assume you are logged in to EC2
8080
1. $sudo certbot --nginx -d [Insert FQDN here]
8181
Example command: $sudo certbot --nginx -d anythingllm.exampleorganization.org
8282
This command will generate the appropriate certificate files, write the files to /etc/letsencrypt/live/yourFQDN, and make updates to the nginx
83-
configuration file for anythingllm locdated at /etc/nginx/conf.d/anything.llm
83+
configuration file for anythingllm located at /etc/nginx/conf.d/anything.llm
8484
3. Enter the email address you would like to use for updates.
8585
4. Accept the terms of service.
86-
5. Accept or decline to recieve communication from letsencrypt.
86+
5. Accept or decline to receive communication from LetsEncrypt.
8787

8888
## Step 10: Test Cert installation
8989
1. $sudo cat /etc/nginx/conf.d/anything.conf

cloud-deployments/aws/cloudformation/cloudformation_create_anythingllm.json

+6-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"InstanceType": {
66
"Description": "EC2 instance type",
77
"Type": "String",
8-
"Default": "t2.small"
8+
"Default": "t3.small"
99
},
1010
"InstanceVolume": {
1111
"Description": "Storage size of disk on Instance in GB",
@@ -83,28 +83,16 @@
8383
"#!/bin/bash\n",
8484
"# check output of userdata script with sudo tail -f /var/log/cloud-init-output.log\n",
8585
"sudo yum install docker -y\n",
86-
"sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\n",
87-
"sudo chmod +x /usr/local/bin/docker-compose\n",
88-
"sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose\n",
8986
"sudo systemctl enable docker\n",
9087
"sudo systemctl start docker\n",
91-
"sudo yum install git -y\n",
92-
"git clone https://github.com/Mintplex-Labs/anything-llm.git /home/ec2-user/anything-llm\n",
93-
"touch /home/ec2-user/anything-llm/server/storage/anythingllm.db\n",
94-
"cd /home/ec2-user/anything-llm/docker\n",
95-
"cp .env.example .env\n",
96-
"cd ../frontend\n",
97-
"rm -rf .env.production\n",
98-
"cat >> .env.production << \"END\"\n",
99-
"GENERATE_SOURCEMAP=true\n",
100-
"VITE_API_BASE=\"/api\"\n",
101-
"END\n",
102-
"sudo chown ec2-user:ec2-user -R /home/ec2-user/anything-llm\n",
103-
"sudo docker-compose -f /home/ec2-user/anything-llm/docker/docker-compose.yml up -d\n",
88+
"mkdir -p /home/ec2-user/anythingllm\n",
89+
"touch /home/ec2-user/anythingllm/.env\n",
90+
"sudo chown ec2-user:ec2-user -R /home/ec2-user/anythingllm\n",
91+
"docker pull mintplexlabs/anythingllm:master\n",
92+
"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",
10493
"echo \"Container ID: $(sudo docker ps --latest --quiet)\"\n",
10594
"export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)\n",
10695
"echo \"Health check: $ONLINE\"\n",
107-
"if [ \"$ONLINE\" = 200 ] ; then echo \"Running migrations...\" && curl -Is http://localhost:3001/api/migrate | head -n 1|cut -d$' ' -f2; fi\n",
10896
"echo \"Setup complete! AnythingLLM instance is now online!\"\n",
10997
"\n",
11098
"--//--\n"

cloud-deployments/digitalocean/terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "digitalocean_droplet" "anything_llm_instance" {
1919
image = "ubuntu-22-10-x64"
2020
name = "anything-llm-instance"
2121
region = "nyc3"
22-
size = "s-1vcpu-1gb"
22+
size = "s-2vcpu-2gb"
2323

2424
user_data = templatefile("user_data.tp1", {
2525
env_content = local.formatted_env_content

cloud-deployments/digitalocean/terraform/user_data.tp1

+4-43
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,16 @@ sudo apt-get update
55
sudo apt-get install -y docker.io
66
sudo usermod -a -G docker ubuntu
77

8-
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
9-
sudo chmod +x /usr/local/bin/docker-compose
10-
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
11-
128
sudo systemctl enable docker
139
sudo systemctl start docker
1410

15-
sudo apt-get install -y git
16-
17-
git clone https://github.com/Mintplex-Labs/anything-llm.git /home/anything-llm
18-
cd /home/anything-llm/docker
19-
20-
cat >> .env << END
21-
${env_content}
22-
UID="1000"
23-
GID="1000"
24-
NO_DEBUG="true"
25-
END
26-
27-
echo "Set .env file"
28-
29-
cd ../frontend
30-
sudo rm -rf .env.production
31-
32-
sudo cat >> .env.production << END
33-
GENERATE_SOURCEMAP=true
34-
VITE_API_BASE="/api"
35-
END
11+
mkdir -p /home/anythingllm
12+
touch /home/anythingllm/.env
3613

37-
echo "Set .env.production file"
38-
39-
cd ../docker
40-
sudo docker-compose up -d --build
14+
sudo docker pull mintplexlabs/anythingllm:master
15+
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
4116
echo "Container ID: $(sudo docker ps --latest --quiet)"
4217

43-
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
44-
echo "Placeholder folders in storage created."
45-
46-
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) touch /app/server/storage/anythingllm.db
47-
echo "SQLite DB placeholder set."
48-
49-
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) chown -R anythingllm:anythingllm /app/collector /app/server
50-
echo "File permissions corrected."
51-
5218
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
5319
echo "Health check: $ONLINE"
54-
55-
if [ "$ONLINE" = 200 ]; then
56-
echo "Running migrations..." && curl -Is http://localhost:3001/api/migrate | head -n 1 | cut -d$' ' -f2
57-
fi
58-
5920
echo "Setup complete! AnythingLLM instance is now online!"

cloud-deployments/gcp/deployment/DEPLOY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ gcloud deployment-manager deployments delete anything-llm-deployment
5151
## Please read this notice before submitting issues about your deployment
5252
5353
**Note:**
54-
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.
54+
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.
5555
5656
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.
5757

cloud-deployments/gcp/deployment/gcp_deploy_anything_llm.yaml

+5-44
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,18 @@ resources:
2727
sudo apt-get update
2828
sudo apt-get install -y docker.io
2929
sudo usermod -a -G docker ubuntu
30-
31-
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
32-
sudo chmod +x /usr/local/bin/docker-compose
33-
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
34-
3530
sudo systemctl enable docker
3631
sudo systemctl start docker
3732
38-
sudo apt-get install -y git
39-
40-
git clone https://github.com/Mintplex-Labs/anything-llm.git /home/anything-llm
41-
cd /home/anything-llm/docker
42-
43-
cat >> .env << END
44-
!SUB::USER::CONTENT!
45-
UID="1000"
46-
GID="1000"
47-
NO_DEBUG="true"
48-
END
49-
50-
echo "Set .env file"
51-
52-
cd ../frontend
53-
sudo rm -rf .env.production
54-
55-
sudo cat >> .env.production << END
56-
GENERATE_SOURCEMAP=true
57-
VITE_API_BASE="/api"
58-
END
59-
60-
echo "Set .env.production file"
61-
62-
cd ../docker
63-
sudo docker-compose up -d --build
33+
mkdir -p /home/anythingllm
34+
touch /home/anythingllm/.env
35+
36+
sudo docker pull mintplexlabs/anythingllm:master
37+
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
6438
echo "Container ID: $(sudo docker ps --latest --quiet)"
6539
66-
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
67-
echo "Placeholder folders in storage created."
68-
69-
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) touch /app/server/storage/anythingllm.db
70-
echo "SQLite DB placeholder set."
71-
72-
sudo docker container exec -u 0 -t $(sudo docker ps --latest --quiet) chown -R anythingllm:anythingllm /app/collector /app/server
73-
echo "File permissions corrected."
74-
7540
export ONLINE=$(curl -Is http://localhost:3001/api/ping | head -n 1|cut -d$' ' -f2)
7641
echo "Health check: $ONLINE"
7742
78-
if [ "$ONLINE" = 200 ]; then
79-
echo "Running migrations..." && curl -Is http://localhost:3001/api/migrate | head -n 1 | cut -d$' ' -f2
80-
fi
81-
8243
echo "Setup complete! AnythingLLM instance is now online!"
8344

0 commit comments

Comments
 (0)