Add docker-compose install guide

628fc810c7d23ffea2eae4efb3ed8c9a68b41f0d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +57 -45Showing whitespace changes
.github/readme.md+57 -45
@@ -113,7 +113,9 @@ SillyTavern has extensibility support.
113113
114114Tutorials on how to use them can be found in the [Docs](https://docs.sillytavern.app/).
115115
116116## βŒ› Installation
117+
118+### πŸͺŸ Windows
117119
118120> \[!WARNING]
119121>
@@ -121,9 +123,7 @@ Tutorials on how to use them can be found in the [Docs](https://docs.sillytavern
121123> * DO NOT RUN START.BAT WITH ADMIN PERMISSIONS
122124> * INSTALLATION ON WINDOWS 7 IS IMPOSSIBLE AS IT CAN NOT RUN NODEJS 18.16
123125
124-## πŸͺŸ Windows
126+#### Installing via Git (recommended)
125-
126-### Installing via Git
127127
1281281. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended)
1291292. Install [Git for Windows](https://gitforwindows.org/)
@@ -138,7 +138,7 @@ Tutorials on how to use them can be found in the [Docs](https://docs.sillytavern
1381387. Once everything is cloned, double-click `Start.bat` to make NodeJS install its requirements.
1391398. The server will then start, and SillyTavern will pop up in your browser.
140140
141141#### Installing via GitHub Desktop
142142
143143(This allows git usage **only** in GitHub Desktop, if you want to use `git` on the command line too, you also need to install [Git for Windows](https://gitforwindows.org/))
144144
@@ -152,7 +152,7 @@ Tutorials on how to use them can be found in the [Docs](https://docs.sillytavern
152152 9. After the installation process, if everything is working, the command console window should look like this and a SillyTavern tab should be open in your browser:
153153 10. Connect to any of the [supported APIs](https://docs.sillytavern.app/usage/api-connections/) and start chatting!
154154
155155### 🐧 Linux & 🍎 MacOS
156156
157157For MacOS / Linux all of these will be done in a Terminal.
158158
@@ -168,6 +168,57 @@ For MacOS / Linux all of these will be done in a Terminal.
168168* `./start.sh`
169169* `bash start.sh`
170170
171+## πŸ‹ Installing via Docker
172+
173+These instructions assume you have installed Docker, are able to access your command line for the installation of containers, and familiar with their general operation.
174+
175+### Using the GitHub Container Registry
176+
177+#### Docker Compose (easiest)
178+
179+Grab the `docker-compose.yml` file from the [GitHub Repository](https://github.com/SillyTavern/SillyTavern/blob/release/docker/docker-compose.yml) and run the following command in the directory where the file is located. This will pull the latest release image from the GitHub Container Registry and start the container, automatically creating the necessary volumes.
180+
181+```shell
182+docker-compose up
183+```
184+
185+Customize the `docker-compose.yml` file to your needs. The default port is 8000. If you want to adjust the server configuration using environment variables, read the documentation [here](https://docs.sillytavern.app/administration/config-yaml/#environment-variables).
186+
187+#### Docker CLI (advanced)
188+
189+You will need two mandatory directory mappings and a port mapping to allow SillyTavern to function. In the command, replace your selections in the following places:
190+
191+#### Container Variables
192+
193+##### Volume Mappings
194+
195+* [config] - The directory where SillyTavern configuration files will be stored on your host machine
196+* [data] - The directory where SillyTavern user data (including characters) will be stored on your host machine
197+* [plugins] - (optional) The directory where SillyTavern server plugins will be stored on your host machine
198+* [extensions] - (optional) The directory where global UI extensions will be stored on your host machine
199+
200+##### Port Mappings
201+
202+* [PublicPort] - The port to expose the traffic on. This is mandatory, as you will be accessing the instance from outside of its virtual machine container. DO NOT expose this to the internet without implementing a separate service for security.
203+
204+##### Additional Settings
205+
206+* [DockerNet] - The docker network that the container should be created with a connection to. If you don't know what it is, see the [official Docker documentation](https://docs.docker.com/reference/cli/docker/network/).
207+* [version] - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" and "release" tags that point to the nightly images of the respective branches, but this may not be appropriate, if you are utilizing extensions that could be broken, and may need time to update.
208+
209+#### Install command
210+
211+1. Open your Command Line
212+2. Run the following command
213+
214+`docker run --name='sillytavern' --net='[DockerNet]' -p '8000:8000/tcp' -v '[plugins]':'/home/node/app/plugins':'rw' -v '[config]':'/home/node/app/config':'rw' -v '[data]':'/home/node/app/data':'rw' -v '[extensions]':'/home/node/app/public/scripts/extensions/third-party':'rw' 'ghcr.io/sillytavern/sillytavern:[version]'`
215+
216+> Note that 8000 is a default listening port. Don't forget to use an appropriate port if you change it in the config.
217+
218+### Building the image yourself
219+
220+We have a comprehensive guide on using SillyTavern in Docker [here](http://docs.sillytavern.app/installation/docker/) which covers installations on Windows, macOS and Linux! Give it a read if you wish to build the image yourself.
221+
171222## ⚑ Installing via SillyTavern Launcher
172223
173224SillyTavern Launcher is an installation wizard that will help you get setup with many options, including installing a backend for local inference.
@@ -239,45 +290,6 @@ chmod +x install.sh && ./install.sh
239290chmod +x launcher.sh && ./launcher.sh
240291```
241292
242-## πŸ‹ Installing via Docker
243-
244-These instructions assume you have installed Docker, are able to access your command line for the installation of containers, and familiar with their general operation.
245-
246-### Building the image yourself
247-
248-We have a comprehensive guide on using SillyTavern in Docker [here](http://docs.sillytavern.app/installation/docker/) which covers installations on Windows, macOS and Linux! Give it a read if you wish to build the image yourself.
249-
250-### Using the GitHub Container Registry (easiest)
251-
252-You will need two mandatory directory mappings and a port mapping to allow SillyTavern to function. In the command, replace your selections in the following places:
253-
254-#### Container Variables
255-
256-##### Volume Mappings
257-
258-* [config] - The directory where SillyTavern configuration files will be stored on your host machine
259-* [data] - The directory where SillyTavern user data (including characters) will be stored on your host machine
260-* [plugins] - (optional) The directory where SillyTavern server plugins will be stored on your host machine
261-* [extensions] - (optional) The directory where global UI extensions will be stored on your host machine
262-
263-##### Port Mappings
264-
265-* [PublicPort] - The port to expose the traffic on. This is mandatory, as you will be accessing the instance from outside of its virtual machine container. DO NOT expose this to the internet without implementing a separate service for security.
266-
267-##### Additional Settings
268-
269-* [DockerNet] - The docker network that the container should be created with a connection to. If you don't know what it is, see the [official Docker documentation](https://docs.docker.com/reference/cli/docker/network/).
270-* [version] - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" and "release" tags that point to the nightly images of the respective branches, but this may not be appropriate, if you are utilizing extensions that could be broken, and may need time to update.
271-
272-#### Install command
273-
274-1. Open your Command Line
275-2. Run the following command
276-
277-`docker run --name='sillytavern' --net='[DockerNet]' -p '8000:8000/tcp' -v '[plugins]':'/home/node/app/plugins':'rw' -v '[config]':'/home/node/app/config':'rw' -v '[data]':'/home/node/app/data':'rw' -v '[extensions]':'/home/node/app/public/scripts/extensions/third-party':'rw' 'ghcr.io/sillytavern/sillytavern:[version]'`
278-
279-> Note that 8000 is a default listening port. Don't forget to use an appropriate port if you change it in the config.
280-
281293## πŸ“± Installing via Termux on Android OS
282294
283295> \[!NOTE]