Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Oct 1, 2014
1 parent ec982f2 commit 6c1a34e
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM debian:wheezy

ADD https://github.com/tildaslash/RatticWeb/archive/v1.2.1.zip /opt/v1.2.1.zip

RUN apt-get update
RUN apt-get install -y unzip python python-pip \
python-dev gcc libsqlite3-dev \
libcurl4-openssl-dev libldap2-dev \
libsasl2-dev libxml2-dev libxslt-dev apache2 libapache2-mod-wsgi

RUN cd /opt/ && unzip v1.2.1.zip && rm -f v1.2.1.zip

ADD ./requirements-sqlite.txt /opt/RatticWeb-1.2.1/
ADD ./local.cfg /opt/RatticWeb-1.2.1/conf/local.cfg
ADD ./rattic.conf /etc/apache2/conf.d/sites-enabled/rattic
ADD ./start-apache.sh /start-apache.sh

RUN cd /opt/RatticWeb-1.2.1/ && pip install -r requirements-sqlite.txt
RUN cd /opt/RatticWeb-1.2.1/ && ./manage.py syncdb --noinput && ./manage.py migrate --all
RUN cd /opt/RatticWeb-1.2.1/ && mkdir static && ./manage.py collectstatic -c --noinput
RUN cd /opt/RatticWeb-1.2.1/ && ./manage.py demosetup
RUN chmod +x /start-apache.sh && chown www-data /opt/RatticWeb-1.2.1/ && chown www-data:www-data /opt/RatticWeb-1.2.1/rattic.db

EXPOSE 80

CMD ["/start-apache.sh"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# docker-ratticdb

Something I hacked together to experiment with RatticDB. This is purely for expiermental purposes and **NOT** fit for production use (yet) as there's no SSL and it's configured to use an SQLite database.

To run, clone this project and build the docker image. Then do:

docker run -p 80:80 your-ratticdb-image-name

Then browse to http://localhost.

The default credentials are admin / rattic.
11 changes: 11 additions & 0 deletions local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[ratticweb]
debug = False
secretkey = hjkhl324kl9*(^^&$jjjad;hasdo9012nds.e[kpt-=-])
hostname = localhost

[filepaths]
static = /opt/RatticWeb-1.2.1/static

[database]
engine = django.db.backends.sqlite3
name = /opt/RatticWeb-1.2.1/rattic.db
35 changes: 35 additions & 0 deletions rattic.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
</VirtualHost>

Alias /robots.txt /opt/RatticWeb-1.2.1/static/robots.txt
Alias /favicon.ico /opt/RatticWeb-1.2.1/static/favicon.ico

AliasMatch ^/([^/]*\.css) /opt/RatticWeb-1.2.1/static/styles/$1

Alias /media/ /opt/RatticWeb-1.2.1/media/
Alias /static/ /opt/RatticWeb-1.2.1/static/

<Directory /opt/RatticWeb-1.2.1/static>
Order deny,allow
Allow from all
</Directory>

<Directory /opt/RatticWeb-1.2.1/media>
Order deny,allow
Allow from all
</Directory>

WSGIScriptAlias / /opt/RatticWeb-1.2.1/ratticweb/wsgi.py
WSGIPassAuthorization On
WSGIDaemonProcess rattic processes=2 threads=25 home=/opt/RatticWeb-1.2.1/ python-path=/opt/RatticWeb-1.2.1:/opt/RatticWeb-1.2.1.venv/lib/python2.6/site-packages display-name=%{GROUP}
WSGIProcessGroup rattic

<Directory /opt/RatticWeb-1.2.1/ratticweb>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
2 changes: 2 additions & 0 deletions requirements-sqlite.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r requirements-base.txt
pysqlite
6 changes: 6 additions & 0 deletions start-apache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

rm -rf /run/apache2/*

source /etc/apache2/envvars
exec apache2 -D FOREGROUND

0 comments on commit 6c1a34e

Please sign in to comment.