aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--.gitmodules3
-rw-r--r--.htaccess6
-rw-r--r--GNUmakefile35
-rw-r--r--INSTALL79
-rw-r--r--README70
-rw-r--r--__init__.py0
-rw-r--r--dicoclient/__init__.py19
-rw-r--r--dicoclient/dicoclient.py415
-rw-r--r--dicoclient/dicoshell.py321
-rw-r--r--dicoclient/setup.py39
m---------dicodock0
-rw-r--r--dicoweb.wsgi27
-rw-r--r--docker-compose.override.yml27
-rw-r--r--docker/Dockerfile9
-rw-r--r--docker/gcide.css (renamed from static/gcide.css)0
-rw-r--r--docker/settings_docker.py256
-rw-r--r--docker/templates/404.html (renamed from templates/404.html)0
-rw-r--r--docker/templates/500.html (renamed from templates/500.html)0
-rw-r--r--docker/templates/about.html (renamed from templates/about.html)2
-rw-r--r--docker/templates/base.html (renamed from templates/base.html)33
-rw-r--r--docker/templates/download.html (renamed from templates/download.html)8
-rw-r--r--docker/templates/index.html (renamed from templates/index.html)32
-rw-r--r--docker/templates/info.html38
-rw-r--r--docker/templates/license.html (renamed from templates/license.html)2
-rw-r--r--docker/templates/opensearch.xml (renamed from templates/opensearch.xml)6
-rw-r--r--docker/urls.py (renamed from templatetags/dictlookup.py)24
-rw-r--r--docker/views.py347
-rw-r--r--docker/withsetting.py (renamed from templatetags/withsetting.py)4
-rw-r--r--dummy_translations.py40
-rw-r--r--gcide.wsgi25
-rw-r--r--index.html15
-rw-r--r--manage.py23
-rw-r--r--settings-sample.py125
-rw-r--r--static/18px-Bulbgraph.pngbin1210 -> 0 bytes
-rw-r--r--static/dicoweb.css134
-rw-r--r--static/dicoweb.js80
-rw-r--r--static/gnu-head-sm.jpgbin5286 -> 0 bytes
-rw-r--r--templatetags/__init__.py0
-rw-r--r--templatetags/macros.py160
-rw-r--r--urls.py28
-rw-r--r--views.py253
42 files changed, 840 insertions, 1852 deletions
diff --git a/.gitignore b/.gitignore
index d8249a5..28da172 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
1.emacs.desktop 1.emacs*
2settings.py 2.env
3local.yml
3*~ 4*~
4tmp/ 5\#*
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..60a9a90
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
1[submodule "dicodock"]
2 path = dicodock
3 url = ssh://gray@git.gnu.org.ua/dico/dicodock.git
diff --git a/.htaccess b/.htaccess
deleted file mode 100644
index 2df5844..0000000
--- a/.htaccess
+++ /dev/null
@@ -1,6 +0,0 @@
1Options All -Indexes
2<Files ~ "^\.emacs">
3 Order allow,deny
4 Deny from all
5 Satisfy All
6</Files>
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..e5e91b5
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,35 @@
1PROJECT = gcidedock
2command = docker compose -p $(PROJECT) \
3 -f dicodock/docker-compose.yml \
4 -f docker-compose.override.yml
5ifneq (,$(wildcard local.yml))
6 command += -f local.yml
7endif
8ifneq (,$(wildcard .env))
9 command += --env-file .env
10 include .env
11 ifneq (,$(PROFILE))
12 command += --profile $(PROFILE)
13 endif
14endif
15
16
17define goal =
18$(1):
19 $$(command) $(1)$(if $(filter-out up, $(1)),, -d)
20endef
21
22all: build
23
24build_dicoweb_orig:
25 docker compose -f dicodock/docker-compose.yml build dicoweb
26
27build: build_dicoweb_orig
28
29$(foreach verb, build config up down restart ps, $(eval $(call goal, $(verb))))
30
31bootstrap:
32 git submodule update --init --recursive
33
34
35
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index ee9a98b..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,79 +0,0 @@
1GNU Dico - Dicoweb INSTALL
2Copyright (C) 2008-2010, 2012 Wojciech Polak
3
4* Dicoweb requirements
5======================
6
7- Django 1.0+ -- a Python Web framework (http://www.djangoproject.com/)
8- Wit -- a wiki translator distributed within GNU Dico.
9 (http://puszcza.gnu.org.ua/projects/wit/)
10
11* Installation instructions
12===========================
13
14Rename 'settings-sample.py' to 'settings.py' and edit your
15local Dicoweb site configuration.
16
17
18** The development/test server
19------------------------------
20
21Change the current working directory into the `dicoweb' directory
22and run the command `python manage.py runserver'. You will see
23the following output:
24
25 Validating models...
26 0 errors found.
27
28 Django version 1.0, using settings 'dicoweb.settings'
29 Development server is running at http://127.0.0.1:8000/
30 Quit the server with CONTROL-C.
31
32** Production server with mod_wsgi
33----------------------------------
34
35Apache configuration:
36
37 LoadModule wsgi_module modules/mod_wsgi.so
38 WSGIScriptAlias / /usr/local/django/dicoweb/dicoweb.wsgi
39 Alias /static "/usr/local/django/dicoweb/static"
40
41More detailed information is available at:
42http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
43
44** Production server with mod_python
45------------------------------------
46
47Apache configuration:
48
49 LoadModule python_module modules/mod_python.so
50 <Location "/">
51 SetHandler python-program
52 PythonHandler django.core.handlers.modpython
53 PythonPath "sys.path + ['/usr/local/django', '/usr/local/django/dicoweb']"
54 SetEnv DJANGO_SETTINGS_MODULE dicoweb.settings
55 PythonInterpreter dicoweb
56 PythonDebug Off
57 </Location>
58
59 <Location "/static">
60 SetHandler None
61 </Location>
62 <Location "/favicon.ico">
63 SetHandler None
64 </Location>
65
66 <Directory "/usr/local/django/dicoweb/">
67 AllowOverride All
68 Options None
69 Order allow,deny
70 Allow from all
71 </Directory>
72
73
74
75Local Variables:
76mode: outline
77paragraph-separate: "[ ]*$"
78version-control: never
79End:
diff --git a/README b/README
new file mode 100644
index 0000000..b94672c
--- /dev/null
+++ b/README
@@ -0,0 +1,70 @@
1* Overview
2
3This file describes docker-based setup for the gcide web site.
4
5* Installation
6
71. make bootstrap
8
9This will prepare GNU dico sources for building.
10
112. make build
12
13This will build the docker images.
14
153. Edit the .env file. It should contain the following variables:
16
17 PROFILE
18 Optional. Defines the kind of http server to use for serving
19 static data. Allowed values are: lighttpd or nginx. If empty,
20 the http server on host server must be configured to serve static
21 data.
22 DICOWEB_NAME
23 Domain name of the server.
24 DICOWEB_PORT
25 Port the dicoweb container is listening on.
26 DICOWEB_ADMIN
27 Email address of the administrator.
28 DICT_SERVER
29 IP address or hostname of the dict server to use. The server must
30 offer the gcide database.
31 PIES_SYSLOG_SERVER
32 IP address and port number of the syslog server.
33
344. Configure your syslog server to receive and route log messages from
35 gcideweb.
36
375. make up
38
39This will start the system.
40
41* Maintenance
42
43Most commands are performed by invoking `make' with the corresponding
44command verb:
45
46** make config
47
48 Inspect the resulting docker-compose.yml.
49
50** make build