Constructing Image Repository Switching Site Images to Self-built Services
Home broadband environment: Practical process sharing of setting up Lankong Image Repository
Purpose/Usage
For personal use, self-hosted image repositories are currently adequate.
Visit: Carl Notes Image Repository
Login to the backend to manage image content in the image repository
Related Content
Implementation Method
Docker Deployment of Lsky Pro Image Repository Application
1 | docker pull dko0/lsky-pro |
Configuring PicGO
Download and install PicGo, Mac OS X: [PicGo-2.4.0-beta.6-x64.dmg](https://github.com/Molunerfinn/PicGo/releases
https://picgo-release.molunerfinn.com/2.4.0-beta.6/PicGo-2.4.0-beta.6-x64.dmg)
Open the main interface/window, plugin settings, search and install the plugin named: lankong (version downloaded: lankong 1.1.3)
Image Settings 》 lankong
1 | Lsky Pro Version: V2 |
The preferred method to obtain the Auth Token for Lsky Pro Lankong Image Repository, recommended (run the command in Terminal):
1 | curl --location --request POST 'https://imgserver.com:3/api/v1/tokens' \ |
Please modify the URL to match the URL of your self-hosted Lankong Image Repository, and use your login username and password for email and password.
This section is based on: https://github.com/hellodk34/picgo-plugin-lankong
Test: Drag a file here or click to upload, then check the backend of Lankong Image Repository to confirm that the image has been uploaded to the system
Configuring Typora
Settings 》 Preferences
Switch Typora to Chinese language version (as only the Chinese version currently has the PicGo option)
Preferences 》 Images 》 Upload Service Settings. Choose: PicGo.app
Then click on: Verify Image Upload Option
My settings failed the first time, so I checked the logs as instructed:
1
2
3
4
5
6
7
8
9
10
11
12
13------Error Stack Begin------
Error: You must be logged in to use.
at Object.We [as handle] (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/index.cjs.js:1:21399)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async je.doUpload (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/index.cjs.js:1:19834)
at async je.start (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/index.cjs.js:1:18605)
at async $t.upload (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/index.cjs.js:1:74902)
at async Object.upload (/Applications/PicGo.app/Contents/Resources/app.asar/index.js:2:686906)
at async hr (/Applications/PicGo.app/Contents/Resources/app.asar/index.js:2:689655)
at async /Applications/PicGo.app/Contents/Resources/app.asar/index.js:2:690736
-------Error Stack End-------
2024-02-21 13:37:13 [PicGo INFO] [PicGo Server] upload result
2024-02-21 13:37:13 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑Copy an image to the clipboard, paste it into the content of an article, right-click on the image, and upload it
PicGo will display the image to be uploaded and the upload progress until the image is automatically uploaded to the image repository
Completion of the entire process
You can refer to: Upload Images
Associating with Alist’s Directory
This is an extension made based on personal usage to share all images from the image repository
Modify docker-compose.yml, add mapping:
- /volume2/KingchuxingSSD512G/MacBookPro_Skitch:/home/share10
docker exec -it alist /bin/bash
1 | mkdir share7 && mkdir share8 && mkdir share9 && mkdir share10 && mkdir share11 && mkdir share12 |
Restart docker-compose
1 | This will not be successful, need to use docker-compose down and up |
Enter Alist’s backend management, add “Local Storage”
Map /home/share10 to the external directory: /Image Repository\MacBookPro_Skitch
Result similar to: https://file.carlzeng.com:3/%E5%9B%BE%E5%BA%8AMacBookPro_Skitch/storage/app/uploads/2024/02/21
NPM Reverse Proxy Access with Port
- Modify /config/app.php (around lines 57-60, modify the following 2 lines):
1 | //Original: |
Modify https://xxxxx.com:4443 to your own domain name and port according to your situation.
- Add a line below line 32 in /app/Providers/ApServiceProvider.php:
1 | \Illuminate\Support\Facades\URL::forceScheme('https'); |
Inspiration Sources
Developed a PicGo image upload plugin for Lankong Image Repository Lsky Pro picgo-plugin-lankong
Failed to load static resources #317
HTTPS+Domain+Port Access Issue, NginxProxyManager Reverse Proxy #607
Raspberry Pi Deploying Lankong Image Repository through Docker