feat(kutt): customization and bump version (#755)
This commit is contained in:
parent
2abfc520f1
commit
c9adae846e
|
|
@ -1,75 +1,230 @@
|
||||||
captainVersion: 4
|
captainVersion: 4
|
||||||
services:
|
services:
|
||||||
$$cap_appname-postgres:
|
$$cap_appname:
|
||||||
image: postgres:12-alpine
|
caproverExtra:
|
||||||
volumes:
|
containerHttpPort: $$cap_KUTT_PORT
|
||||||
- $$cap_appname-postgres-data:/var/lib/postgresql/data
|
image: kutt/kutt:$$cap_KUTT_VERSION
|
||||||
restart: always
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: kutt
|
PORT: $$cap_KUTT_PORT
|
||||||
POSTGRES_PASSWORD: $$cap_kutt_postgres_password
|
SITE_NAME: $$cap_KUTT_SITE_NAME
|
||||||
POSTGRES_DB: kutt
|
DEFAULT_DOMAIN: $$cap_appname.$$cap_root_domain
|
||||||
caproverExtra:
|
LINK_LENGTH: $$cap_KUTT_LINK_LENGTH
|
||||||
notExposeAsWebApp: 'true'
|
DB_HOST: srv-captain--$$cap_appname-db
|
||||||
$$cap_appname-redis:
|
DB_NAME: $$cap_POSTGRES_DB
|
||||||
image: redis:6.0-alpine
|
DB_USER: $$cap_POSTGRES_USER
|
||||||
volumes:
|
DB_PASSWORD: $$cap_POSTGRES_PASSWORD
|
||||||
- $$cap_appname-redis:/data
|
REDIS_HOST: srv-captain--$$cap_appname-cache
|
||||||
caproverExtra:
|
DISALLOW_REGISTRATION: $$cap_KUTT_DISALLOW_REGISTRATION
|
||||||
notExposeAsWebApp: 'true'
|
DISALLOW_ANONYMOUS_LINKS: $$cap_KUTT_DISALLOW_ANONYMOUS_LINKS
|
||||||
$$cap_appname-kutt:
|
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:
|
depends_on:
|
||||||
- $$cap_appname-postgres
|
- $$cap_appname-db
|
||||||
- $$cap_appname-redis
|
- $$cap_appname-cache
|
||||||
image: kutt/kutt:$$cap_kutt_version
|
|
||||||
restart: always
|
$$cap_appname-db:
|
||||||
caproverExtra:
|
caproverExtra:
|
||||||
containerHttpPort: '3000'
|
notExposeAsWebApp: 'true'
|
||||||
|
image: postgres:$$cap_POSTGRES_VERSION
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: srv-captain--$$cap_appname-postgres
|
POSTGRES_USER: $$cap_POSTGRES_USER
|
||||||
DB_NAME: kutt
|
POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
|
||||||
DB_USER: kutt
|
POSTGRES_DB: $$cap_POSTGRES_DB
|
||||||
DB_PASSWORD: $$cap_kutt_postgres_password
|
volumes:
|
||||||
REDIS_HOST: srv-captain--$$cap_appname-redis
|
- $$cap_appname-db:/var/lib/postgresql/data
|
||||||
SITE_NAME: $$cap_appname URL Shortener
|
|
||||||
DEFAULT_DOMAIN: $$cap_appname-kutt.$$cap_root_domain
|
$$cap_appname-cache:
|
||||||
JWT_SECRET: $$cap_gen_random_hex(64)
|
caproverExtra:
|
||||||
MAIL_HOST: $$cap_kutt_mail_host
|
notExposeAsWebApp: 'true'
|
||||||
MAIL_PORT: $$cap_kutt_mail_port
|
image: redis:$$cap_REDIS_VERSION
|
||||||
MAIL_USER: $$cap_kutt_mail_user
|
volumes:
|
||||||
MAIL_PASSWORD: $$cap_kutt_mail_password
|
- $$cap_appname-cache:/data
|
||||||
|
|
||||||
caproverOneClickApp:
|
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 .
|
|
||||||
|
|
||||||
IMPORTANT: It will take up to 2 minutes for the application to be ready. Before that, you might see a 502 error page.
|
|
||||||
displayName: Kutt
|
displayName: Kutt
|
||||||
|
description: Free Modern URL Shortener
|
||||||
isOfficial: true
|
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: https://github.com/thedevs-network/kutt
|
||||||
documentation: Taken from 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 <support@kutt.it>`.
|
||||||
|
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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue