forked from simonswine/docker-ratticdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec982f2
commit 6c1a34e
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements-base.txt | ||
pysqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |