From 3065e5be62673ff69d27d64e4f6c0920784be1d4 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 20 Oct 2015 04:13:23 -0400 Subject: [PATCH] Cleanup contributed files. --- contrib/apache/mayan | 19 ----- contrib/apache/mayan-edms.wsgi | 14 ---- contrib/gunicorn/gunicorn.conf.py | 31 ------- contrib/misc/mayan_edms_worker.sh | 2 +- contrib/nginx/mayan_uwsgi.conf | 19 ----- contrib/nginx/nginx-fs-socket.conf | 46 ----------- contrib/nginx/nginx.conf | 34 -------- contrib/supervisor/libreoffice-headless.conf | 5 -- contrib/supervisor/mayan-edms.conf | 7 -- contrib/upstart/service_demon.sh | 10 --- contrib/upstart/upstart.conf | 10 --- contrib/uwsgi/mayan.ini | 14 ---- docs/topics/getting_started.rst | 85 -------------------- 13 files changed, 1 insertion(+), 295 deletions(-) delete mode 100644 contrib/apache/mayan delete mode 100644 contrib/apache/mayan-edms.wsgi delete mode 100644 contrib/gunicorn/gunicorn.conf.py delete mode 100644 contrib/nginx/mayan_uwsgi.conf delete mode 100644 contrib/nginx/nginx-fs-socket.conf delete mode 100644 contrib/nginx/nginx.conf delete mode 100644 contrib/supervisor/libreoffice-headless.conf delete mode 100644 contrib/supervisor/mayan-edms.conf delete mode 100755 contrib/upstart/service_demon.sh delete mode 100644 contrib/upstart/upstart.conf delete mode 100644 contrib/uwsgi/mayan.ini delete mode 100644 docs/topics/getting_started.rst diff --git a/contrib/apache/mayan b/contrib/apache/mayan deleted file mode 100644 index 4c880f586e..0000000000 --- a/contrib/apache/mayan +++ /dev/null @@ -1,19 +0,0 @@ - - # Uncomment if libapache2-mod-xsendfile is installed - # XSendFile On - # XSendFileAllowAbove On - ServerName mayan.yoursite.com - ServerAdmin admin@yoursite.com - DocumentRoot /var/www/mayan-edms - WSGIScriptAlias / /var/www/mayan-edms/mayan/mayan-edms.wsgi - - - Order allow,deny - Allow from all - - - Alias /static /var/www/mayan-edms/media/static - - SetHandler None - - diff --git a/contrib/apache/mayan-edms.wsgi b/contrib/apache/mayan-edms.wsgi deleted file mode 100644 index c917f319df..0000000000 --- a/contrib/apache/mayan-edms.wsgi +++ /dev/null @@ -1,14 +0,0 @@ -# sample wsgi file for usage with apache webserver -# mayan installation in a virtualenv /opt/mayan/venv -# apache deployment in /var/www/mayan-edms -import os -import sys -import site -# set up python path to virtual environment -site.addsitedir(‘/opt/mayan/venv/lib/python2.7/site-packages’) -sys.path.append(‘/var/www/mayan-edms’) -os.environ[‘PYTHON_EGG_CACHE’]=’/var/www/django/cache’ -#django WSGI specifics -From django.core.handlers.wsgi import WSGIHandler -os.environ[‘DJANGO_SETTING_MODULE’] = ‘mayan.settings.production’ -application = WSGIHandler() diff --git a/contrib/gunicorn/gunicorn.conf.py b/contrib/gunicorn/gunicorn.conf.py deleted file mode 100644 index 7e3916f474..0000000000 --- a/contrib/gunicorn/gunicorn.conf.py +++ /dev/null @@ -1,31 +0,0 @@ -# invoke gunicorn using -# 'gunicorn -c .wsgi:application -import os -import multiprocessing - -from django.conf import settings - -bind = settings.GUNICORN_BIND -workers = multiprocessing.cpu_count() * 2 + 1 - -preload_app = True - -chdir = settings.BASE_DIR - -user = settings.PROCESS_USER -group = user - -log_dir = os.path.join( - os.path.dirname(settings.BASE_DIR), 'gunicorn_logs', settings.PROCESS_NAME) -if not os.path.isdir(log_dir): - os.makedirs(log_dir) - import pwd - import grp - os.chown(log_dir, - pwd.getpwnam(user).pw_uid, - grp.getgrnam(group).gr_gid) - -accesslog = os.path.join(log_dir, 'access.log') -errorlog = os.path.join(log_dir, 'error.log') - -proc_name = settings.PROCESS_NAME \ No newline at end of file diff --git a/contrib/misc/mayan_edms_worker.sh b/contrib/misc/mayan_edms_worker.sh index 43b30c6343..59e1c4055b 100755 --- a/contrib/misc/mayan_edms_worker.sh +++ b/contrib/misc/mayan_edms_worker.sh @@ -1,3 +1,3 @@ #!/bin/sh -DJANGO_SETTINGS_MODULE='mayan.settings.celery_redis' celery -A mayan worker -l DEBUG -Q checkouts,mailing,uploads,converter,ocr,tools,indexing,metadata -Ofair -B +DJANGO_SETTINGS_MODULE='mayan.settings.celery_redis' celery -A mayan worker -l DEBUG -Ofair -B diff --git a/contrib/nginx/mayan_uwsgi.conf b/contrib/nginx/mayan_uwsgi.conf deleted file mode 100644 index 9d272c9729..0000000000 --- a/contrib/nginx/mayan_uwsgi.conf +++ /dev/null @@ -1,19 +0,0 @@ -server { - listen 80; - listen [::]:80 ipv6only=on; - server_name mayan; - access_log /var/log/nginx/access_mayan.log; - error_log /var/log/nginx/error_mayan.log; - - location / { - uwsgi_pass unix:///run/uwsgi/app/mayan/socket; - include uwsgi_params; - uwsgi_param UWSGI_SCHEME $scheme; - uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; - } - - location /static/ { - root /srv/mayan/projects/mayan/mayan-edms/mayan/media/; - } - -} diff --git a/contrib/nginx/nginx-fs-socket.conf b/contrib/nginx/nginx-fs-socket.conf deleted file mode 100644 index c29c812575..0000000000 --- a/contrib/nginx/nginx-fs-socket.conf +++ /dev/null @@ -1,46 +0,0 @@ -upstream app_server { - server unix:/var/tmp/filesystem.sock fail_timeout=0; -} - -server { - listen 80; - - access_log off; - error_log /var/log/nginx/mayan-edms_error.log; - - gzip on; - gzip_http_version 1.0; - gzip_comp_level 2; - gzip_proxied any; - gzip_min_length 1100; - gzip_buffers 16 8k; - gzip_types text/plain text/css application/x-javascript text/xml -application/xml application/xml+rss text/javascript; - - # Some version of IE 6 don't handle compression well on some mime-types, so just disable for them - gzip_disable "MSIE [1-6].(?!.*SV1)"; - - # Set a vary header so downstream proxies don't send cached gzipped content to IE6 - gzip_vary on; - - location / { - client_max_body_size 2M; - proxy_read_timeout 600s; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - if (!-f $request_filename) { - proxy_pass http://app_server; - break; - } - } - - location /static { - expires 1h; - alias /usr/share/mayan-edms/lib/python2.7/site-packages/mayan/media/static; - } - - location /favicon.ico { - alias /usr/share/mayan-edms/lib/python2.7/site-packages/mayan/media/static/core/images/favicon.ico; - } -} diff --git a/contrib/nginx/nginx.conf b/contrib/nginx/nginx.conf deleted file mode 100644 index dfc719ae8c..0000000000 --- a/contrib/nginx/nginx.conf +++ /dev/null @@ -1,34 +0,0 @@ -server { - listen 80; - server_name mayan.crossculturalconsult.com www.mayan.crossculturalconsult.com; - - access_log /var/log/nginx/mayan.crossculturalconsult.com.access.log; - error_log /var/log/nginx/mayan.crossculturalconsult.com.error.log; - root /home/mayan/production/; - - location /static/ { - alias /home/mayan/production/static_collected/; - } - - location /media/ { - alias /home/mayan/production/media/; - } - - location = /favicon.ico { - alias /home/mayan/production/media/favicon.ico; - } - - location = /robots.txt { - alias /home/mayan/production/media/robots.txt; - } - - location / { - proxy_pass http://127.0.0.1:8731; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - client_max_body_size 10m; - } - allow all; -} \ No newline at end of file diff --git a/contrib/supervisor/libreoffice-headless.conf b/contrib/supervisor/libreoffice-headless.conf deleted file mode 100644 index c70edbaea0..0000000000 --- a/contrib/supervisor/libreoffice-headless.conf +++ /dev/null @@ -1,5 +0,0 @@ -[program:openoffice] -command = /usr/lib/libreoffice/program/soffice.bin "-accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;" -headless -nodefault -nofirststartwizard -nolockcheck -nologo -norestore -stdout_logfile= /var/log/libreoffice-headless.log -redirect_stderr = true -autostart = true diff --git a/contrib/supervisor/mayan-edms.conf b/contrib/supervisor/mayan-edms.conf deleted file mode 100644 index 0dc16df199..0000000000 --- a/contrib/supervisor/mayan-edms.conf +++ /dev/null @@ -1,7 +0,0 @@ -[program:mayan-edms] -command = /usr/share/mayan-edms/contrib/scripts/gunicorn_start.sh -user = www-data -autostart = true -autorestart = true -redirect_stderr = true - diff --git a/contrib/upstart/service_demon.sh b/contrib/upstart/service_demon.sh deleted file mode 100755 index 8d591edc3d..0000000000 --- a/contrib/upstart/service_demon.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Run the gunicorn service - -# Make sure we're in the right virtual env and location -source /home/mayan/.virtualenvs/production/bin/activate -source /home/mayan/.virtualenvs/production/bin/postactivate - -cd /home/mayan/production - -exec gunicorn -c /home/mayan/production/deploy/gunicorn.conf.py mayan.wsgi:application \ No newline at end of file diff --git a/contrib/upstart/upstart.conf b/contrib/upstart/upstart.conf deleted file mode 100644 index 261d408b83..0000000000 --- a/contrib/upstart/upstart.conf +++ /dev/null @@ -1,10 +0,0 @@ -start on started rc -stop on stopped rc - -respawn -respawn limit 3 5 - -setuid mayan -setgid mayan - -exec /home/mayan/production/deploy/production/service_demon.sh \ No newline at end of file diff --git a/contrib/uwsgi/mayan.ini b/contrib/uwsgi/mayan.ini deleted file mode 100644 index fc641f1f84..0000000000 --- a/contrib/uwsgi/mayan.ini +++ /dev/null @@ -1,14 +0,0 @@ -# Sample file for uswgi with mayan installed in a virtualenv mayan -# with project directory mayan e.g. for use with nginx connecting via -# local unix socket -[uwsgi] -#socket = 127.0.0.1:3031 -plugin = python -chdir = /srv/mayan/projects/mayan/mayan-edms -virtualenv = /srv/mayan/.virtualenvs/mayan -env = DJANGO_SETTINGS_MODULE=mayan.settings.production -module = django.core.handlers.wsgi:WSGIHandler() -processes = 4 -threads = 2 -stats = :9191 -buffer-size=32768 \ No newline at end of file diff --git a/docs/topics/getting_started.rst b/docs/topics/getting_started.rst deleted file mode 100644 index 44101220c1..0000000000 --- a/docs/topics/getting_started.rst +++ /dev/null @@ -1,85 +0,0 @@ -=============== -Getting started -=============== - -Before starting to use **Mayan EDMS**, two things need to be configured: - -- At least one document source -- At least one document type - -Document sources ----------------- - -Document sources define from where documents will be uploaded or gathered. -To add a document source go to the ``Setup`` section, then to the ``Sources`` section. -To obtain the fastest working setup, create a new source of type ``Web form``. -``Web forms`` are just HTML forms with a ``Browse`` button that will open the file upload -dialog when clicked. Name it something simple like ``Local documents`` and select whether or not -compressed files uploaded from this source will be automatically decompressed and -their content treated as individual documents. - -Document types --------------- - -Examples of document types are: ``Legal documents``, ``Internal documents``, ``Medical records``, ``Designing specifications``, ``Permits``. -A document type represent a class of documents which share some common property. -A good indicator that can help you determine your document types is what kind of -information or ``metadata`` is attached to those documents. - -Once a document source and a document type have been created you have all the minimal -elements required to start uploading documents. - -Defining metadata ------------------ - -With your document types defined it should be much easier now to define the required -``metadata`` for each of these document types. When creating ``metadata`` types, -the first thing that will be needed is the internal name with which this metadata -type will be referenced in other areas of **Mayan EDMS**. The internal name must not -contain spaces or uppercase characters. After the internal name, enter the name that -will be visible to you and your users, which usually will be similar or the same as the -internal name, but with proper capitalization and spacing. The ``metadata types`` -can have default values to speed up data entry. They can be single number or a -words enclosed in quotes, ie:: - - "Building A" - -or:: - - "Storage room 1" - -Default values can also be defined using Django template tags, such as:: - - {% now "Y" %} - -This will set the metadata default value to the current year. - -If you want to restrict or standardize the values for a metadata type, use the ``Lookup`` field to -define a comman delimited list of options that will be allowed. - - 2000,2001,2002,2003,2004. - -Instead of a free entry text field, your users will get a dropdown list of years, -this will ensure an unified data entry formatting. - -Metadata types can be assigned in two ways to a document type, by making it an -optional or a required metadata type for a specific document. This method -allows metadata very important for some types of documents (like Invoice -numbers to Invoices) to be required for an Invoice to be able to be uploaded. -Accordingly optional metadata types will be presented, but users are not required to -enter a value to be able to upload a document. - -Indexes -------- - -After defining all your metadata types you can also define indexes to -let **Mayan EDMS** automatically categorize your documents based on their metadata values. -To create an index to organize invoices by a year metadata field do the following: - -- Create a year metadata type with the name ``year`` and the label ``Year``. -- Create an invoice document type and assign it the ``year`` metadata type as a required metadata type. -- Create a new index, give it the name ``invoices_per_year`` and the label ``Invoices per year``. -- Edit the index's ``Tree template``, add a ``New child node``, and enter ``{{ document.metadata_value_of.year }}`` as the ``Indexing expression``, check the ``Link documents`` checkbox and save. -- Link this new index to the invoice document type using the ``Document types`` button of the index. - -Now every time a new invoice upload or an existing invoice's ``year`` metadata value is changed, a new folder will be created in the ``Invoices`` index with the corresponding invoices for that year.