From cb1d85e458f0cfbb770fb2d838d450c15152a3ad Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Tue, 21 Oct 2025 16:57:57 +0530 Subject: [PATCH] feat(readme): add volumes --- README.md | 8 ++++---- docker-compose.yaml | 15 +++++++++++++++ docs/installation/UPDATING.md | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 docker-compose.yaml diff --git a/README.md b/README.md index ce2db8b..33e62e6 100644 --- a/README.md +++ b/README.md @@ -79,19 +79,19 @@ There are mainly 2 ways of installing Perplexica - With Docker, Without Docker. Perplexica can be easily run using Docker. Simply run the following command: ```bash -docker run -p 3000:3000 --name perplexica itzcrazykns1337/perplexica:latest +docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:latest ``` This will pull and start the Perplexica container with the bundled SearxNG search engine. Once running, open your browser and navigate to http://localhost:3000. You can then configure your settings (API keys, models, etc.) directly in the setup screen. -**Note**: The image includes both Perplexica and SearxNG, so no additional setup is required. +**Note**: The image includes both Perplexica and SearxNG, so no additional setup is required. The `-v` flags create persistent volumes for your data and uploaded files. #### Using Perplexica with Your Own SearxNG Instance If you already have SearxNG running, you can use the slim version of Perplexica: ```bash -docker run -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 --name perplexica itzcrazykns1337/perplexica:slim-latest +docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:slim-latest ``` **Important**: Make sure your SearxNG instance has: @@ -118,7 +118,7 @@ If you prefer to build from source or need more control: ```bash docker build -t perplexica . - docker run -p 3000:3000 --name perplexica perplexica + docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica perplexica ``` 5. Access Perplexica at http://localhost:3000 and configure your settings in the setup screen. diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..d9d811d --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,15 @@ +services: + perplexica: + image: itzcrazykns1337/perplexica:latest + ports: + - "3000:3000" + volumes: + - data:/home/perplexica/data + - uploads:/home/perplexica/uploads + restart: unless-stopped + +volumes: + data: + name: 'perplexica-data' + uploads: + name: 'perplexica-uploads' diff --git a/docs/installation/UPDATING.md b/docs/installation/UPDATING.md index daa1122..0603671 100644 --- a/docs/installation/UPDATING.md +++ b/docs/installation/UPDATING.md @@ -10,7 +10,7 @@ Simply pull the latest image and restart your container: docker pull itzcrazykns1337/perplexica:latest docker stop perplexica docker rm perplexica -docker run -p 3000:3000 --name perplexica itzcrazykns1337/perplexica:latest +docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:latest ``` For slim version: @@ -19,7 +19,7 @@ For slim version: docker pull itzcrazykns1337/perplexica:slim-latest docker stop perplexica docker rm perplexica -docker run -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 --name perplexica itzcrazykns1337/perplexica:slim-latest +docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:slim-latest ``` Once updated, go to http://localhost:3000 and verify the latest changes. Your settings are preserved automatically.