diff options
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | .htaccess | 6 | ||||
-rw-r--r-- | GNUmakefile | 35 | ||||
-rw-r--r-- | INSTALL | 79 | ||||
-rw-r--r-- | README | 70 | ||||
-rw-r--r-- | __init__.py | 0 | ||||
-rw-r--r-- | dicoclient/__init__.py | 19 | ||||
-rw-r--r-- | dicoclient/dicoclient.py | 415 | ||||
-rw-r--r-- | dicoclient/dicoshell.py | 321 | ||||
-rw-r--r-- | dicoclient/setup.py | 39 | ||||
m--------- | dicodock | 0 | ||||
-rw-r--r-- | dicoweb.wsgi | 27 | ||||
-rw-r--r-- | docker-compose.override.yml | 27 | ||||
-rw-r--r-- | docker/Dockerfile | 9 | ||||
-rw-r--r-- | docker/gcide.css (renamed from static/gcide.css) | 0 | ||||
-rw-r--r-- | docker/settings_docker.py | 256 | ||||
-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.html | 38 | ||||
-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.py | 347 | ||||
-rw-r--r-- | docker/withsetting.py (renamed from templatetags/withsetting.py) | 4 | ||||
-rw-r--r-- | dummy_translations.py | 40 | ||||
-rw-r--r-- | gcide.wsgi | 25 | ||||
-rw-r--r-- | index.html | 15 | ||||
-rw-r--r-- | manage.py | 23 | ||||
-rw-r--r-- | settings-sample.py | 125 | ||||
-rw-r--r-- | static/18px-Bulbgraph.png | bin | 1210 -> 0 bytes | |||
-rw-r--r-- | static/dicoweb.css | 134 | ||||
-rw-r--r-- | static/dicoweb.js | 80 | ||||
-rw-r--r-- | static/gnu-head-sm.jpg | bin | 5286 -> 0 bytes | |||
-rw-r--r-- | templatetags/__init__.py | 0 | ||||
-rw-r--r-- | templatetags/macros.py | 160 | ||||
-rw-r--r-- | urls.py | 28 | ||||
-rw-r--r-- | views.py | 253 |
42 files changed, 840 insertions, 1852 deletions
@@ -1,4 +1,5 @@ | |||
1 | .emacs.desktop | 1 | .emacs* |
2 | settings.py | 2 | .env |
3 | local.yml | ||
3 | *~ | 4 | *~ |
4 | tmp/ | 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 @@ | |||
1 | Options 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 @@ | |||
1 | PROJECT = gcidedock | ||
2 | command = docker compose -p $(PROJECT) \ | ||
3 | -f dicodock/docker-compose.yml \ | ||
4 | -f docker-compose.override.yml | ||
5 | ifneq (,$(wildcard local.yml)) | ||
6 | command += -f local.yml | ||
7 | endif | ||
8 | ifneq (,$(wildcard .env)) | ||
9 | command += --env-file .env | ||
10 | include .env | ||
11 | ifneq (,$(PROFILE)) | ||
12 | command += --profile $(PROFILE) | ||
13 | endif | ||
14 | endif | ||
15 | |||
16 | |||
17 | define goal = | ||
18 | $(1): | ||
19 | $$(command) $(1)$(if $(filter-out up, $(1)),, -d) | ||
20 | endef | ||
21 | |||
22 | all: build | ||
23 | |||
24 | build_dicoweb_orig: | ||
25 | docker compose -f dicodock/docker-compose.yml build dicoweb | ||
26 | |||
27 | build: build_dicoweb_orig | ||
28 | |||
29 | $(foreach verb, build config up down restart ps, $(eval $(call goal, $(verb)))) | ||
30 | |||
31 | bootstrap: | ||
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 @@ | |||
1 | GNU Dico - Dicoweb INSTALL | ||
2 | Copyright (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 | |||
14 | Rename 'settings-sample.py' to 'settings.py' and edit your | ||
15 | local Dicoweb site configuration. | ||
16 | |||
17 | |||
18 | ** The development/test server | ||
19 | ------------------------------ | ||
20 | |||
21 | Change the current working directory into the `dicoweb' directory | ||
22 | and run the command `python manage.py runserver'. You will see | ||
23 | the 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 | |||
35 | Apache 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 | |||
41 | More detailed information is available at: | ||
42 | http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango | ||
43 | |||
44 | ** Production server with mod_python | ||
45 | ------------------------------------ | ||
46 | |||
47 | Apache 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 | |||
75 | Local Variables: | ||
76 | mode: outline | ||
77 | paragraph-separate: "[ ]*$" | ||
78 | version-control: never | ||
79 | End: | ||
@@ -0,0 +1,70 @@ | |||
1 | * Overview | ||
2 | |||
3 | This file describes docker-based setup for the gcide web site. | ||
4 | |||
5 | * Installation | ||
6 | |||
7 | 1. make bootstrap | ||
8 | |||
9 | This will prepare GNU dico sources for building. | ||
10 | |||
11 | 2. make build | ||
12 | |||
13 | This will build the docker images. | ||
14 | |||
15 | 3. 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 | |||
34 | 4. Configure your syslog server to receive and route log messages from | ||
35 | gcideweb. | ||
36 | |||
37 | 5. make up | ||
38 | |||
39 | This will start the system. | ||
40 | |||
41 | * Maintenance | ||
42 | |||
43 | Most commands are performed by invoking `make' with the corresponding | ||
44 | command verb: | ||
45 | |||
46 | ** make config | ||
47 | |||
48 | Inspect the resulting docker-compose.yml. | ||
49 | |||
50 | ** make build | ||