summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/kutt.yml
blob: 567f81daab83aa60736c876d569933dd03b9db86 (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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
captainVersion: 4
services:
    $$cap_appname:
        caproverExtra:
            containerHttpPort: $$cap_KUTT_PORT
        image: kutt/kutt:$$cap_KUTT_VERSION
        environment:
            PORT: $$cap_KUTT_PORT
            SITE_NAME: $$cap_KUTT_SITE_NAME
            DEFAULT_DOMAIN: $$cap_appname.$$cap_root_domain
            LINK_LENGTH: $$cap_KUTT_LINK_LENGTH
            DB_HOST: srv-captain--$$cap_appname-db
            DB_NAME: $$cap_POSTGRES_DB
            DB_USER: $$cap_POSTGRES_USER
            DB_PASSWORD: $$cap_POSTGRES_PASSWORD
            REDIS_HOST: srv-captain--$$cap_appname-cache
            DISALLOW_REGISTRATION: $$cap_KUTT_DISALLOW_REGISTRATION
            DISALLOW_ANONYMOUS_LINKS: $$cap_KUTT_DISALLOW_ANONYMOUS_LINKS
            USER_LIMIT_PER_DAY: $$cap_KUTT_USER_LIMIT_PER_DAY
            NON_USER_COOLDOWN: $$cap_KUTT_NON_USER_COOLDOWN
            DEFAULT_MAX_STATS_PER_LINK: $$cap_KUTT_DEFAULT_MAX_STATS_PER_LINK
            CUSTOM_DOMAIN_USE_HTTPS: $$cap_KUTT_CUSTOM_DOMAIN_USE_HTTPS
            JWT_SECRET: $$cap_KUTT_JWT_SECRET
            ADMIN_EMAILS: $$cap_KUTT_ADMIN_EMAILS
            RECAPTCHA_SITE_KEY: $$cap_KUTT_RECAPTCHA_SITE_KEY
            RECAPTCHA_SECRET_KEY: $$cap_KUTT_RECAPTCHA_SECRET_KEY
            GOOGLE_SAFE_BROWSING_KEY: $$cap_KUTT_GOOGLE_SAFE_BROWSING_KEY
            GOOGLE_ANALYTICS: $$cap_KUTT_GOOGLE_ANALYTICS_INDIVIDUAL
            GOOGLE_ANALYTICS_UNIVERSAL: $$cap_KUTT_GOOGLE_ANALYTICS_UNIVERSAL
            MAIL_HOST: $$cap_KUTT_MAIL_HOST
            MAIL_PORT: $$cap_KUTT_MAIL_PORT
            MAIL_SECURE: $$cap_KUTT_MAIL_SECURE
            MAIL_USER: $$cap_KUTT_MAIL_USER
            MAIL_FROM: $$cap_KUTT_MAIL_FROM
            MAIL_PASSWORD: $$cap_KUTT_MAIL_PASSWORD
            REPORT_EMAIL: $$cap_KUTT_REPORT_EMAIL
            CONTACT_EMAIL: $$cap_KUTT_CONTACT_EMAIL
        depends_on:
            - $$cap_appname-db
            - $$cap_appname-cache

    $$cap_appname-db:
        caproverExtra:
            notExposeAsWebApp: 'true'
        image: postgres:$$cap_POSTGRES_VERSION
        environment:
            POSTGRES_USER: $$cap_POSTGRES_USER
            POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
            POSTGRES_DB: $$cap_POSTGRES_DB
        volumes:
            - $$cap_appname-db:/var/lib/postgresql/data

    $$cap_appname-cache:
        caproverExtra:
            notExposeAsWebApp: 'true'
        image: redis:$$cap_REDIS_VERSION
        volumes:
            - $$cap_appname-cache:/data

caproverOneClickApp:
    displayName: Kutt
    description: Free Modern URL Shortener
    isOfficial: true
    documentation: https://github.com/thedevs-network/kutt
    instructions:
        start: |-
            Kutt is a modern URL shortener with support for custom domains. Shorten URLs, manage your links and view the click rate statistics.
        end: |-
            Kutt has been successfully deployed! It might take few moments before it's fully started.
            You can access it at `http://$$cap_appname.$$cap_root_domain`.
    variables:
        - id: $$cap_KUTT_VERSION
          label: Version | Application
          description: Kutt's version. Check out their valid tags at https://hub.docker.com/r/kutt/kutt/tags
          defaultValue: v2.7.3
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_VERSION
          label: Version | Database
          description: PostgreSQL's version. Check out their valid tags at https://hub.docker.com/_/postgres/tags
          defaultValue: '14.0-alpine'
          validRegex: /.{1,}/
        - id: $$cap_REDIS_VERSION
          label: Version | Cache
          description: Redis' version. Check out their valid tags at https://hub.docker.com/_/redis/tags
          defaultValue: '6.2-alpine'
          validRegex: /.{1,}/
        - id: $$cap_KUTT_ADMIN_EMAILS
          label: Administration | Admin Email Addresses
          description: Comma separated email addresses of administrators so they can access admin actions on settings page.
        - id: $$cap_KUTT_PORT
          label: General | Port
          description: Kutt's port. Should be left untouched.
          defaultValue: 3000
          validRegex: /.{1,}/
        - id: $$cap_KUTT_SITE_NAME
          label: General | Site Name
          description: The name of the site (e.g. `My Link Shortener`).
          defaultValue: Kutt
          validRegex: /.{1,}/
        - id: $$cap_KUTT_LINK_LENGTH
          label: General | Link Length
          description: Length of the generated links.
          defaultValue: 6
          validRegex: /.{1,}/
        - id: $$cap_KUTT_DEFAULT_MAX_STATS_PER_LINK
          label: Performance | Maximum Stats Per Link
          description: Maximum number of visits for each link to have detailed statistics.
          defaultValue: 5000
          validRegex: /.{1,}/
        - id: $$cap_KUTT_DISALLOW_REGISTRATION
          label: Privacy | Disallow Registration
          description: Whether to disable registration.
          defaultValue: 'false'
          validRegex: /^(true|false)$/
        - id: $$cap_KUTT_DISALLOW_ANONYMOUS_LINKS
          label: Privacy | Disallow Anonymous Links
          description: Whether to disable creation of links anonymously.
          defaultValue: 'false'
          validRegex: /^(true|false)$/
        - id: $$cap_KUTT_USER_LIMIT_PER_DAY
          label: Anti-Abuse | Daily Limit
          description: Daily link creation limit for each user.
          defaultValue: 50
          validRegex: /.{1,}/
        - id: $$cap_KUTT_NON_USER_COOLDOWN
          label: Anti-Abuse | Non-User Cool Down
          description: Cool down for non-logged in users in minutes. Set to `0` to disable.
          defaultValue: '0'
          validRegex: /.{1,}/
        - id: $$cap_KUTT_RECAPTCHA_SITE_KEY
          label: Anti-Abuse | Recaptcha Site Key
          description: >-
              Site key for Recaptcha.
              Leave blank if you do not want to use Recaptcha.
        - id: $$cap_KUTT_RECAPTCHA_SECRET_KEY
          label: Anti-Abuse | Recaptcha Secret Key
          description: >-
              Secret key for Recaptcha.
              Leave blank if you do not want to use Recaptcha.
        - id: $$cap_KUTT_GOOGLE_SAFE_BROWSING_KEY
          label: Anti-Abuse | Google Safe Browsing Key
          description: >-
              Key for Google Cloud API to prevent from users from submitting malware URLs.
              Leave blank if you do not want to use Google Safe Browsing.
        - id: $$cap_KUTT_CUSTOM_DOMAIN_USE_HTTPS
          label: Security | HTTPS For Custom Domains
          description: Whether to use HTTPS for links with custom domain.
          defaultValue: 'false'
          validRegex: /^(true|false)$/
        - id: $$cap_KUTT_JWT_SECRET
          label: Security | JWT Secret
          description: >-
              Passphrase to encrypt JWT. Should be a long and secure key.
              You can also generate one using command `openssl rand -hex 64`.
          defaultValue: $$cap_gen_random_hex(64)
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_DB
          label: Database | Name
          description: Name of the database in PostgreSQL.
          defaultValue: kutt
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_USER
          label: Database | User
          description: Name of the database user in PostgreSQL.
          defaultValue: kutt
          validRegex: /.{1,}/
        - id: $$cap_POSTGRES_PASSWORD
          label: Database | Password
          description: Password of the database user in PostgreSQL.
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /.{1,}/
        - id: $$cap_KUTT_GOOGLE_ANALYTICS_INDIVIDUAL
          label: Tracking | Google Analytics Tracking ID
          description: >-
              Tracking ID for Google Analytics. Format is `UA-XXXX-XX`.
              Leave blank if you do not want to use Google Analytics.
        - id: $$cap_KUTT_GOOGLE_ANALYTICS_UNIVERSAL
          label: Tracking | Google Analytics Universal Tracking ID
          description: >-
              Universal tracking ID for Google Analytics. Format is `UA-XXXX-XX`.
              Leave blank if you do not want to use Google Analytics.
        - id: $$cap_KUTT_MAIL_HOST
          label: Mail | Host
          description: >-
              Mail host used to send verification mails.
              Leave blank if you do not want to use email delivery.
              If you would like to approve users manually you will have
              to search for the verification token of the user
              in the database (`SELECT verification_token FROM users WHERE email='myuser@mydomain'`)
              and call `/verify/<verification_token>` to verify.
        - id: $$cap_KUTT_MAIL_PORT
          label: Mail | Port
          description: >-
              Port of mail host used to send verification mails.
              Using port `465` is recommended.
              Leave blank if you do not want to use email delivery.
          defaultValue: 465
        - id: $$cap_KUTT_MAIL_USER
          label: Mail | User
          description: >-
              Mail user that sends verification mails.
              Leave blank if you do not want to use email delivery.
        - id: $$cap_KUTT_MAIL_PASSWORD
          label: Mail | Password
          description: >-
              Password of mail user that sends verification mails.
              Leave blank if you do not want to use email delivery.
        - id: $$cap_KUTT_MAIL_SECURE
          label: Mail | Security
          description: >-
              Whether to use secure connection to send mails.
              Use value `true` (recommended) or `false` when using email delivery.
              Leave blank when not using email delivery.
          defaultValue: 'true'
        - id: $$cap_KUTT_MAIL_FROM
          label: Mail | Sender
          description: >-
              Specify the "From" field.
              Example: `Kutt <[email protected]>`.
              Leave blank to use the mail address only.
        - id: $$cap_KUTT_REPORT_EMAIL
          label: Contact | Report Mail Address
          description: >-
              Mail address that will receive submitted reports.
              Leave blank to disable.
        - id: $$cap_KUTT_CONTACT_EMAIL
          label: Contact | Contact Mail Address
          description: >-
              Support mail address to show on the application.
              Leave blank to disable.