📝 Docs(custom): add support for docker

ISSUES CLOSED: #118
This commit is contained in:
Kuingsmile
2023-12-06 20:31:41 -08:00
parent f901811d03
commit 2de1a1f0f6
4 changed files with 176 additions and 0 deletions

View File

@@ -123,3 +123,46 @@ Known plugins that cannot be used are:
- picgo-plugin-auto-delete (built-in)
Welcome everyone to test other plugins. If there are plugins that cannot be used, please open an issue for feedback.
## 15. How to run PicList-core through Docker?
### docker run
Change the `./piclist` to your own path, and change the `piclist123456` to your own secret key.
```bash
docker run -d \
--name piclist \
--restart always \
-p 36677:36677 \
-v "./piclist:/root/.piclist" \
kuingsmile/piclist:latest \
node /usr/local/bin/picgo-server -k piclist123456
```
### docker-compose
download `docker-compose.yml` from piclist-core repo, or copy the following content to `docker-compose.yml`:
```yaml
version: '3.3'
services:
node:
image: 'kuingsmile/piclist:latest'
container_name: piclist
restart: always
ports:
- 36677:36677
volumes:
- './piclist:/root/.piclist'
command: node /usr/local/bin/picgo-server -k piclist123456
```
You can change the `volumes` to your own path and change the `command` to your own secret key.
Then run:
```bash
docker-compose up -d
```