summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/mayan-edms.yml
blob: 6457ea0bbc2a879115ee064fb34ea6027f709615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
captainVersion: 4
services:
    # Mayan EDMS
    $$cap_appname:
        depends_on:
            - $$cap_appname-db
            - $$cap_appname-redis
        image: mayanedms/mayanedms:$$cap_app_version
        restart: always
        environment:
            MAYAN_CELERY_BROKER_URL: 'redis://:$$cap_redis_pass@srv-captain--$$cap_appname-redis:6379/0'
            MAYAN_CELERY_RESULT_BACKEND: 'redis://:$$cap_redis_pass@srv-captain--$$cap_appname-redis:6379/1'
            MAYAN_DATABASES: "{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'$$cap_dbname','PASSWORD':'$$cap_dbpass','USER':'$$cap_dbuser','HOST':'srv-captain--$$cap_appname-db'}}"
            MAYAN_LOCK_MANAGER_BACKEND: 'mayan.apps.lock_manager.backends.redis_lock.RedisLock'
            MAYAN_LOCK_MANAGER_BACKEND_ARGUMENTS: "{'redis_url':'redis://:$$cap_redis_pass@srv-captain--$$cap_appname-redis:6379/2'}"
            MAYAN_SEARCH_BACKEND: 'mayan.apps.dynamic_search.backends.whoosh.WhooshSearchBackend'
            MAYAN_APT_INSTALLS: '$$cap_ocr_langs'
            MAYAN_DOCKER_WAIT: srv-captain--$$cap_appname-db:5432 srv-captain--$$cap_appname-redis:6379
            MAYAN_DOCUMENTS_LANGUAGE: $$cap_default_document_lang
            MAYAN_TIME_ZONE: $$cap_timezone
            MAYAN_AUTOADMIN_EMAIL: $$cap_email
            MAYAN_AUTOADMIN_PASSWORD: $$cap_password
            MAYAN_AUTOADMIN_USERNAME: $$cap_username
            MAYAN_COMMON_PROJECT_TITLE: $$cap_project_title
        volumes:
            - $$cap_appname-data:/var/lib/mayan
        caproverExtra:
            containerHttpPort: '8000'

    # Redis
    $$cap_appname-redis:
        volumes:
            - $$cap_appname-redis-data:/data
        restart: always
        caproverExtra:
            dockerfileLines:
                - FROM redis:$$cap_redis_version
                - CMD exec redis-server --appendonly 'no' --databases '3' --maxmemory 100mb --maxclients '500' --maxmemory-policy allkeys-lru --save '' --requirepass $$cap_redis_pass
            notExposeAsWebApp: 'true'

    #PostgreSQL
    $$cap_appname-db:
        image: postgres:$$cap_postgres_version
        volumes:
            - $$cap_appname-db-data:/var/lib/postgresql/data
        restart: always
        environment:
            POSTGRES_DB: $$cap_dbname
            POSTGRES_USER: $$cap_dbuser
            POSTGRES_PASSWORD: $$cap_dbpass
        caproverExtra:
            notExposeAsWebApp: 'true'

caproverOneClickApp:
    variables:
        - id: $$cap_app_version
          label: Mayan EDMS version
          defaultValue: 's4.2'
          description: Check out their docker page for the valid tags https://hub.docker.com/r/mayanedms/mayanedms/tags

        - id: $$cap_postgres_version
          label: PostgreSQL version
          defaultValue: '12.9-alpine'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/library/postgres/tags/
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_redis_version
          label: Redis version
          defaultValue: '6.2.1-alpine'
          description: Check out their Docker page for the valid tags https://hub.docker.com/_/redis?tab=tags
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_redis_pass
          label: Redis password
          defaultValue: mayanredispassword
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_dbname
          label: Database Name
          defaultValue: 'mayan'
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_dbuser
          label: Database User
          defaultValue: 'mayandbuser'
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_dbpass
          label: Database Password
          defaultValue: $$cap_gen_random_hex(64)
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_default_document_lang
          label: Default document language
          defaultValue: eng
          description: Use the ISO 639-3 code (https://en.wikipedia.org/wiki/ISO_639). Will default to *eng* if left blank.

        - id: $$cap_language_code
          label: Default language for the installation
          defaultValue: en-us
          description: Mayan EDMS UI will default to this language if the user's locale is not found. Will default to *en-us* if left blank

        - id: $$cap_ocr_langs
          label: Extra packages
          defaultValue: 'tesseract-ocr-spa'
          description: Use to add extra languagues for OCR (English is installed by default). Insert as many packages as you need, separated by a space, as *tesseract-ocr-CODE*. Language codes in https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html

        - id: $$cap_timezone
          label: Time Zone
          defaultValue: UTC
          description: Leave blank if you'd rather change it in System => Setup => Settings

        - id: $$cap_username
          label: Admin username
          defaultValue: admin
          description: Username for your first login

        - id: $$cap_email
          label: Admin email
          defaultValue: [email protected]

        - id: $$cap_pass
          label: Admin password
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /^([^\s^\/])+$/
          description: It will be prompted to you at startup and can be changed, but copy it just in case.

        - id: $$cap_project_title
          label: Project Title (Site's name)
          defaultValue: 'Mayan EDMS'
          description: Title and header of your site

    instructions:
        start: >-
            Mayan EDMS is an open source web-based Document Management System (More info at https://www.mayan-edms.com/)
            Most settings can be set inside the app, but environment variables will override them.
            Minimum requirements 2GB RAM and 2vCPUs. Recommended 4GB RAM and 4vCPUs
        end: >-
            Done!
            Your service is available at http://$$cap_appname.$$cap_root_domain
    displayName: 'Mayan EDMS'
    isOfficial: false
    description: Mayan EDMS is an open source web-based Document Management System with many advanced features.
    documentation: https://www.mayan-edms.com/