summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRonald Loyko <[email protected]>2022-10-10 07:55:01 +0300
committerGitHub <[email protected]>2022-10-09 21:55:01 -0700
commitc9adae846e117c53d5e9f82c335c7b1770486f23 (patch)
tree42e846449d0f5aae38058863637739fe4fd1d19f
parent2abfc520f1d7a71909dcfc83de273908756dd462 (diff)
downloadcaprover-one-click-apps-c9adae846e117c53d5e9f82c335c7b1770486f23.tar.gz
caprover-one-click-apps-c9adae846e117c53d5e9f82c335c7b1770486f23.zip
feat(kutt): customization and bump version (#755)
-rw-r--r--public/v4/apps/kutt.yml283
1 files changed, 219 insertions, 64 deletions
diff --git a/public/v4/apps/kutt.yml b/public/v4/apps/kutt.yml
index e7228a8..567f81d 100644
--- a/public/v4/apps/kutt.yml
+++ b/public/v4/apps/kutt.yml
@@ -1,75 +1,230 @@
captainVersion: 4
services:
- $$cap_appname-postgres:
- image: postgres:12-alpine
- volumes:
- - $$cap_appname-postgres-data:/var/lib/postgresql/data
- restart: always
+ $$cap_appname:
+ caproverExtra:
+ containerHttpPort: $$cap_KUTT_PORT
+ image: kutt/kutt:$$cap_KUTT_VERSION
environment:
- POSTGRES_USER: kutt
- POSTGRES_PASSWORD: $$cap_kutt_postgres_password
- POSTGRES_DB: kutt
+ 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'
- $$cap_appname-redis:
- image: redis:6.0-alpine
+ image: postgres:$$cap_POSTGRES_VERSION
+ environment:
+ POSTGRES_USER: $$cap_POSTGRES_USER
+ POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
+ POSTGRES_DB: $$cap_POSTGRES_DB
volumes:
- - $$cap_appname-redis:/data
+ - $$cap_appname-db:/var/lib/postgresql/data
+
+ $$cap_appname-cache:
caproverExtra:
notExposeAsWebApp: 'true'
- $$cap_appname-kutt:
- depends_on:
- - $$cap_appname-postgres
- - $$cap_appname-redis
- image: kutt/kutt:$$cap_kutt_version
- restart: always
- caproverExtra:
- containerHttpPort: '3000'
- environment:
- DB_HOST: srv-captain--$$cap_appname-postgres
- DB_NAME: kutt
- DB_USER: kutt
- DB_PASSWORD: $$cap_kutt_postgres_password
- REDIS_HOST: srv-captain--$$cap_appname-redis
- SITE_NAME: $$cap_appname URL Shortener
- DEFAULT_DOMAIN: $$cap_appname-kutt.$$cap_root_domain
- JWT_SECRET: $$cap_gen_random_hex(64)
- MAIL_HOST: $$cap_kutt_mail_host
- MAIL_PORT: $$cap_kutt_mail_port
- MAIL_USER: $$cap_kutt_mail_user
- MAIL_PASSWORD: $$cap_kutt_mail_password
-caproverOneClickApp:
- variables:
- - id: $$cap_kutt_version
- label: Kutt Version
- defaultValue: 'v2.7.3'
- description: Check out their Docker page for the valid tags https://hub.docker.com/r/kutt/kutt/tags
- validRegex: /^([^\s^\/])+$/
- - id: $$cap_kutt_postgres_password
- label: Postgres Password
- description: Password must be at least 12 characters. Please use a random string.
- validRegex: /^[^\@]{12,}$/
- - id: $$cap_kutt_mail_host
- label: Kutt Mail Host
- defaultValue: 'smtp.gmail.com'
- description: STMP mail host for Kutt
- - id: $$cap_kutt_mail_port
- label: Kutt Mail Port
- defaultValue: 587
- - id: $$cap_kutt_mail_user
- label: Kutt Mail User
- defaultValue: smtp
- - id: $$cap_kutt_mail_password
- label: Kutt Mail Password
- 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 is deployed and available as $$cap_appname-kutt .
+ image: redis:$$cap_REDIS_VERSION
+ volumes:
+ - $$cap_appname-cache:/data
- IMPORTANT: It will take up to 2 minutes for the application to be ready. Before that, you might see a 502 error page.
+caproverOneClickApp:
displayName: Kutt
+ description: Free Modern URL Shortener
isOfficial: true
- description: Kutt is a modern URL shortener with support for custom domains. Shorten URLs, manage your links and view the click rate statistics.
- documentation: Taken from https://github.com/thedevs-network/kutt
+ 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.