Public | Automated Build

Last pushed: 2 months ago
Short Description
Dockerfile and config files to create a (https://github.com/kenneyhe/django-wiki) container.
Full Description

django-wiki

Dockerfile and configuration files to create a simple django-wiki container.
Use Alpine and python 3.4.6 to reduce size and secure the containers.

Installation

$ sudo docker pull kenney/django-wiki

Usage

$ sudo docker run -d -P --name=django-wiki kenney/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/kenneyhe/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 kenneyhe/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 kenney/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
kenney
Source Repository

Comments (0)