Public | Automated Build

Last pushed: 4 months ago
Short Description
wiki engine based on django framework
Full Description

docker-django-wiki

Dockerfile and configuration files to create a simple django-wiki container.

Installation

$ sudo docker pull camandel/django-wiki

Usage

$ sudo docker run -d -P --name=django-wiki camandel/django-wiki
$ sudo docker port django-wiki 8000
0.0.0.0:49153
$ wget http://localhost:49153 (admin/admin)

Customization

You can change configurations, templates and db:

$ git clone https://github.com/camandel/docker-django-wiki.git ~/src

Then copy the directories for what you need to modify and mount them as volumes:

$ cp -a ~/src/docker-django-wiki/testproject/testproject/{db,templates,settings} /mydata
$ sudo docker run -d -P -v /mydata/db:/db:z -v /mydata/templates:/templates:z -v /mydata/settings:/settings:z --name=django-wiki camandel/django-wiki

SECRET_KEY is now in a separate file. If not present it will be generated:

cat /mydata/settings/secret_key.py
SECRET_KEY='your-secret-key'

Backup

To backup the sqlite db copy it to a local directory or use a persistent volume:

$ sudo docker run -d -P -v /mydata/db:/db:z --name=django-wiki camandel/django-wiki
$ echo '.dump' | sqlite3 /mydata/db/db.sqlite3 > /mydata/backup/wiki.dump

To restore:

$ sqlite3 /mydata/db/db.sqlite3 < /mydata/backup/wiki.dump
Docker Pull Command
Owner
camandel
Source Repository

Comments (1)
daveenglish
9 months ago

Hi Carlo. Could you please add backup and restore commands ti the Full Description? That would make this docker image very useful! Thanks!