From c613eff31ca6e147bd3e8a9c9cc599221de89705 Mon Sep 17 00:00:00 2001
From: Timothy Carambat <rambat1010@gmail.com>
Date: Wed, 20 Dec 2023 11:33:00 -0800
Subject: [PATCH] [Docker] Windows Docker command in Powershell (#480)

* wip

* side by side test

* patch syntax highlighting

* remove spacing formatting

* swap powershell command
---
 docker/HOW_TO_USE_DOCKER.md | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/docker/HOW_TO_USE_DOCKER.md b/docker/HOW_TO_USE_DOCKER.md
index 5b5a58067..f7601750b 100644
--- a/docker/HOW_TO_USE_DOCKER.md
+++ b/docker/HOW_TO_USE_DOCKER.md
@@ -31,6 +31,14 @@ Use the Dockerized version of AnythingLLM for a much faster and complete startup
 
 `docker pull mintplexlabs/anythingllm:master`
 
+<table>
+<tr>
+<th>Linux/MacOs</th>
+<th>Windows Powershell</th>
+</tr>
+<tr>
+<td>
+
 ```shell
 export STORAGE_LOCATION=$HOME/anythingllm && \
 mkdir -p $STORAGE_LOCATION && \
@@ -43,6 +51,25 @@ docker run -d -p 3001:3001 \
 mintplexlabs/anythingllm:master
 ```
 
+</td>
+<td>
+
+```powershell
+$env:STORAGE_LOCATION="$HOME\Documents\anythingllm";
+If(!(Test-Path $env:STORAGE_LOCATION)) {New-Item $env:STORAGE_LOCATION -ItemType Directory};
+If(!(Test-Path "$env:STORAGE_LOCATION\.env")) {New-Item "$env:STORAGE_LOCATION\.env"};
+docker run -d -p 3001:3001 `
+--cap-add SYS_ADMIN `
+-v "$env:STORAGE_LOCATION`:/app/server/storage" `
+-v "$env:STORAGE_LOCATION\.env:/app/server/.env" `
+-e STORAGE_DIR="/app/server/storage" `
+mintplexlabs/anythingllm:master;
+```
+
+</td>
+</tr>
+</table>
+
 Go to `http://localhost:3001` and you are now using AnythingLLM! All your data and progress will persist between
 container rebuilds or pulls from Docker Hub.