title: 【白嫖】使用 CloudFlare R2 搭建个人图床 urlname: -bai-piao--shi-yong-CloudFlare-R2-da-jian-ge-ren-tu-chuang date: 2023-08-27 20:32:03 index_img: https://api.limour.top/randomImg?d=2023-08-27 20:32:03 tags: ['docker', 'ngpm', 'r2']
Free | Paid - Rates | |
---|---|---|
存储 | 10 GB / month | $0.015 / GB-month |
A 类操作 | 1 million requests / month | $4.50 / million requests |
B 类操作 | 10 million requests / month | $0.36 / million requests |
mkdir -p ~/app/Lsky && cd ~/app/Lsky && nano docker-compose.yml
docker-compose up -d
version: '3.3'
services:
lsky-pro:
restart: always
volumes:
- './lsky-pro-data:/var/www/html'
image: 'dko0/lsky-pro'
networks:
default:
external: true
name: ngpm
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
nano ~/.config/rclone/rclone.conf
[img]
type = s3
provider = Cloudflare
access_key_id = xxx
secret_access_key = xxxxxx
endpoint = https://<accountid>.r2.cloudflarestorage.com
acl = private
rclone lsd img:limour-img
git clone https://oauth2:ghp_xxx@github.com/limour-blog/img-bed.git
rclone copy --ignore-existing --progress --ignore-errors img:limour-img ~/img-bed
cd ~/img-bed
git add . && git commit -m 'backup' && git push -u origin main