Cleanup contributed files.

This commit is contained in:
Roberto Rosario
2015-10-20 04:13:23 -04:00
parent 6f6270f11c
commit 3065e5be62
13 changed files with 1 additions and 295 deletions

View File

@@ -1,19 +0,0 @@
<VirtualHost *:80>
# 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
<Directory /var/www/mayan-edms>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/mayan-edms/media/static
<Location "/static">
SetHandler None
</Location>
</VirtualHost>

View File

@@ -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()

View File

@@ -1,31 +0,0 @@
# invoke gunicorn using
# 'gunicorn -c <this_file> <project_module>.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

View File

@@ -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

View File

@@ -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/;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.