
This image is updated via pull requests to the tle06/modern-paste GitHub repo.
Modern Paste is intended for system administrators who wish to host their own installation of a code/text Pastebin on personal servers. It's free and open source: contributions from the developer community are encouraged and always welcome
Modern Paste is a self-hosted Pastebin alternative that is
/paste/1 might display as /paste/9~AEygplxfCPHW4eJctbjMnRi-rYnlYzizqToCmG3BY=)git
make
python3.5
default-jre
build-essential
python-dev
libmysqlclient-dev
rubygems
python-pip
npm
apache2
libapache2-mod-wsgi
nodejs-legacy
port 80
workdir = /var/www/modern-paste
You will need to create a new MySQL user that has R/W privileges to the Modern Paste databases. (You may use the default root user, but it is highly recommended to create a separate user that only has access to the databases that Modern Paste will use.)
First, generate a secure password for the new database user.
$ pwgen -s 96 1
Then, open up a session to your MySQL server as root (the below will prompt you for the root password to authenticate).
$ mysql -u root -p
You'll need to create the new user and all the databases Modern Paste will use. If you only need a production environment and don't plan on running the unit tests on your local server, you may skip creation of the dev and test databases. However, it's recommended that you create all three.
CREATE USER 'modern_paste'@'localhost' IDENTIFIED BY '<password>';
CREATE DATABASE modern_paste;
CREATE DATABASE modern_paste_dev;
CREATE DATABASE modern_paste_test;
GRANT ALL ON modern_paste.* TO 'modern_paste'@'localhost';
GRANT ALL ON modern_paste_dev.* TO 'modern_paste'@'localhost';
GRANT ALL ON modern_paste_test.* TO 'modern_paste'@'localhost';
FLUSH PRIVILEGES;
<password> is the output of pwgen above, or your own password. Please be aware that this password will be stored in plain text in the Modern Paste configuration file.
Starting the modern-paste instance listening on port 80 is as easy as the following:
$ docker run -d --restart=always -p 80:80 \
-e DOMAIN=exemple.com \
-e DATABASE_HOST=localhost \
-e DATABASE_NAME=modern_paste \
-e DATABASE_USER=modern_paste \
-e DATABASE_PASSWORD=mydbuserpassword \
tlnk/modern_paste
Then go to http://localhost/ and go through the wizard.
All data beyond what lives in the database (file uploads, etc) is stored within the default volume /var/www/owncloud. With this volume, ownCloud will only be updated when the file version.php is not present.
<mydatalocation>:/var/www/modern-paste-attachmentsDocker
version: '2'
services:
modern-paste:
image: tlnk/modern-paste
ports:
- 80:80
environment:
DOMAIN: exemple.com
DATABASE_HOST: localhost
DATABASE_NAME: modern_paste
DATABASE_USER: modern_paste
DATABASE_PASSWORD: mydbuserpassword
Content type
Image
Digest
Size
394.7 MB
Last updated
about 9 years ago
docker pull tlnk/modern-paste