Skip to content

camandel/docker-django-wiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Dockerfile and configuration files for a django-wiki container

Resources

License

Stars

Watchers

Forks

Packages

No packages published