Populate .env file using variable inside userdata script ()

Populate .env file using variable
This commit is contained in:
Saravanan Palanisamy 2024-08-10 01:15:52 +04:00 committed by GitHub
parent 1e8d752a54
commit 01e85b0ffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,8 +9,10 @@ sudo systemctl enable docker
sudo systemctl start docker
mkdir -p /home/anythingllm
touch /home/anythingllm/.env
cat <<EOF >/home/anythingllm/.env
${env_content}
EOF
sudo docker pull mintplexlabs/anythingllm
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
echo "Container ID: $(sudo docker ps --latest --quiet)"