piclist 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ name: Build and Push Docker Image
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-and-push:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout Repository
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Set up Docker Buildx
17
+ uses: docker/setup-buildx-action@v1
18
+
19
+ - name: Login to Docker Hub
20
+ uses: docker/login-action@v1
21
+ with:
22
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
23
+ password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
24
+
25
+ - name: Build and Push Docker Image
26
+ uses: docker/build-push-action@v2
27
+ with:
28
+ context: .
29
+ file: ./Dockerfile
30
+ push: true
31
+ tags: kuingsmile/piclist:latest
32
+
33
+ - name: Build and Push Docker Image with Tag
34
+ if: startsWith(github.ref, 'refs/tags/')
35
+ uses: docker/build-push-action@v2
36
+ with:
37
+ context: .
38
+ file: ./Dockerfile
39
+ push: true
40
+ tags: kuingsmile/piclist:${{ github.ref_name }}
package/Dockerfile ADDED
@@ -0,0 +1,9 @@
1
+ FROM node:lts-alpine
2
+
3
+ RUN yarn config set registry https://registry.npmmirror.com/ && \
4
+ yarn config set sharp_binary_host "https://npmmirror.com/mirrors/sharp" && \
5
+ yarn config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips" && \
6
+ yarn global add piclist && \
7
+ rm -rf /var/cache/apk/* /tmp/*
8
+
9
+ EXPOSE 36677
package/README.md CHANGED
@@ -59,6 +59,51 @@ yarn add piclist -D
59
59
 
60
60
  ## Usage
61
61
 
62
+ ### Docker
63
+
64
+ You can use docker to run PicList-Core.
65
+
66
+ #### docker run
67
+
68
+ Change the `./piclist` to your own path, and change the `piclist123456` to your own secret key.
69
+
70
+ ```bash
71
+ docker run -d \
72
+ --name piclist \
73
+ --restart always \
74
+ -p 36677:36677 \
75
+ -v "./piclist:/root/.piclist" \
76
+ kuingsmile/piclist:latest \
77
+ node /usr/local/bin/picgo-server -k piclist123456
78
+ ```
79
+
80
+ #### docker-compose
81
+
82
+ download `docker-compose.yml` from this repo, or copy the following content to `docker-compose.yml`:
83
+
84
+ ```yaml
85
+ version: '3.3'
86
+
87
+ services:
88
+ node:
89
+ image: 'kuingsmile/piclist:latest'
90
+ container_name: piclist
91
+ restart: always
92
+ ports:
93
+ - 36677:36677
94
+ volumes:
95
+ - './piclist:/root/.piclist'
96
+ command: node /usr/local/bin/picgo-server -k piclist123456
97
+ ```
98
+
99
+ You can change the `volumes` to your own path and change the `command` to your own secret key.
100
+
101
+ Then run:
102
+
103
+ ```bash
104
+ docker-compose up -d
105
+ ```
106
+
62
107
  ### Server
63
108
 
64
109
  You can use `picgo-server` to start a server, default port is `36677`.