For this installation, we need the following prerequisites:
Now, let's start the installation procedures:
mkdir docker -p && mkdir docker/lenpaste -p && cd docker/lenpaste
Use the below command to list open ports and if you are using the mentioned port in YAML file, you can change that in the below script:
sudo netstat -tulpn | grep LISTEN
nano docker-compose.yml
Or you can use the Portainer stack section as well.
Now you can paste the below script via the NANO editor if you want to use the Linux CLI, save and exit
version: "2"
services:
lenpaste:
image: git.lcomrade.su/root/lenpaste:latest
restart: always
environment:
# All parameters are optional
- LENPASTE_ADDRESS=:80 # Set -address flag
- LENPASTE_DB_DRIVER=sqlite3 # Set -db-driver flag
- LENPASTE_DB_SOURCE=/root/docker/lenpaste/lenpaste.db # Set -db-source flag
- LENPASTE_DB_CLEANUP_PERIOD=3h # Set -db-cleanup-period flag
- LENPASTE_ROBOTS_DISALLOW=false # If true set -robots-disallow flag
- LENPASTE_TITLE_MAX_LENGTH=100 # Set -title-max-length flag. If 0 disable title, if -1 disable length limit.
- LENPASTE_BODY_MAX_LENGTH=10000 # Set -body-max-length flag. If -1 disable length limit. Can't be -1.
- LENPASTE_MAX_PASTE_LIFETIME=never # Set -max-paste-lifetime flag. Examples: 2d, 12h, 7m.
- LENPASTE_ADMIN_NAME=milootech # Set -admin-name flag.
- [email protected] # Set -admin-mail flag.
volumes:
# /data/lenpaste.db - SQLite DB
- /data/about.html - About this server
- /data/rules.html - This server rules
- "/root/docker/lenpaste/data:/data"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "8468:80"
Now you can start the container by below command or if you are using the Portainer please hit on that deploy button:
docker-compose up -d
Finally, if you want to know how you can work with it, you can watch my video related to this subject.
Have fun…