publish docker
This commit is contained in:
parent
3bc33e3201
commit
b44ace123d
23
README.md
23
README.md
@ -6,7 +6,28 @@ Go to [release](https://git.saveweb.org/saveweb/cnblogs/releases) page, downlaod
|
||||
|
||||
WARNING: DO NOT run `cnblogs_posts_list` concurrently (on same IP), you may be banned by cnblogs.
|
||||
|
||||
NOTE: We will publish a docker image soon™ (<30 minutes).
|
||||
### Docker
|
||||
|
||||
```bash
|
||||
export ARCHIVIST=<your_node_name> # a string that can uniquely identify your node (for example: bob-gcloud-514). (Legal characters: letters, numbers, -, _)
|
||||
```
|
||||
|
||||
```bash
|
||||
if [[ -z "$ARCHIVIST" ]]; then
|
||||
echo "WARN: ARCHIVIST must be set"
|
||||
exit 1
|
||||
fi
|
||||
_image="icecodexi/saveweb:cnblogs"
|
||||
docker pull "${_image}" \
|
||||
&& docker stop cnblogs
|
||||
docker rm -f cnblogs \
|
||||
&& docker run --env ARCHIVIST="$ARCHIVIST" --restart always \
|
||||
--volume /etc/localtime:/etc/localtime:ro \
|
||||
--cpu-shares 512 --memory 512M --memory-swap 512M \
|
||||
--detach --name cnblogs \
|
||||
"${_image}"
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user