diff --git a/public/v4/apps/redash.yml b/public/v4/apps/redash.yml new file mode 100644 index 0000000..977f806 --- /dev/null +++ b/public/v4/apps/redash.yml @@ -0,0 +1,181 @@ +captainVersion: 4 +services: + $$cap_appname: + caproverExtra: + containerHttpPort: 5000 + dockerfileLines: + - FROM redash/redash:$$cap_REDASH_VERSION + - CMD ["server"] + environment: + REDASH_WEB_WORKERS: $$cap_REDASH_WEB_WORKERS + REDASH_HOST: http://$$cap_appname.$$cap_root_domain + REDASH_COOKIE_SECRET: $$cap_REDASH_COOKIE_SECRET + REDASH_SECRET_KEY: $$cap_REDASH_SECRET_KEY + REDASH_MAIL_SERVER: $$cap_REDASH_MAIL_SERVER + REDASH_MAIL_PORT: $$cap_REDASH_MAIL_PORT + REDASH_MAIL_USE_TLS: $$cap_REDASH_MAIL_USE_TLS + REDASH_MAIL_USE_SSL: $$cap_REDASH_MAIL_USE_SSL + REDASH_MAIL_USERNAME: $$cap_REDASH_MAIL_USERNAME + REDASH_MAIL_PASSWORD: $$cap_REDASH_MAIL_PASSWORD + REDASH_MAIL_DEFAULT_SENDER: $$cap_REDASH_MAIL_DEFAULT_SENDER + REDASH_REDIS_URL: redis://srv-captain--$$cap_appname-queue + REDASH_DATABASE_URL: postgresql://$$cap_POSTGRES_USER:$$cap_POSTGRES_PASSWORD@srv-captain--$$cap_appname-db/$$cap_POSTGRES_DB + depends_on: + - $$cap_appname-db + - $$cap_appname-queue + $$cap_appname-scheduler: + caproverExtra: + notExposeAsWebApp: 'true' + dockerfileLines: + - FROM redash/redash:$$cap_REDASH_VERSION + - CMD ["scheduler"] + environment: + QUEUES: celery + WORKERS_COUNT: $$cap_REDASH_SCHEDULER_WORKERS + depends_on: + - $$cap_appname-db + - $$cap_appname-queue + $$cap_appname-scheduled-worker: + caproverExtra: + notExposeAsWebApp: 'true' + dockerfileLines: + - FROM redash/redash:$$cap_REDASH_VERSION + - CMD ["worker"] + environment: + QUEUES: scheduled_queries,schemas + WORKERS_COUNT: $$cap_REDASH_SCHEDULED_WORKERS + depends_on: + - $$cap_appname-db + - $$cap_appname-queue + $$cap_appname-adhoc-worker: + caproverExtra: + notExposeAsWebApp: 'true' + dockerfileLines: + - FROM redash/redash:$$cap_REDASH_VERSION + - CMD ["worker"] + environment: + QUEUES: queries + WORKERS_COUNT: $$cap_REDASH_ADHOC_WORKERS + depends_on: + - $$cap_appname-db + - $$cap_appname-queue + $$cap_appname-queue: + caproverExtra: + notExposeAsWebApp: 'true' + image: redis:$$cap_REDIS_VERSION + $$cap_appname-db: + caproverExtra: + notExposeAsWebApp: 'true' + image: postgres:$$cap_POSTGRES_VERSION + environment: + POSTGRES_DB: $$cap_POSTGRES_DB + POSTGRES_USER: $$cap_POSTGRES_USER + POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD + volumes: + - $$cap_appname-db:/var/lib/postgresql/data +caproverOneClickApp: + displayName: Redash + description: Connect to any data source, easily visualize and share your data + documentation: https://redash.io/help + isOfficial: true + instructions: + start: |- + Redash helps you make sense of your data. + Connect and query your data sources, build dashboards to visualize data and share them with your company. + + **You will need access to your server via SSH to perform a command after deployment. This needs to be done only once.** + end: |- + Redash has been successfully deployed! It might take few moments before it's fully started. + + Please execute the following command on your server in order to trigger database migrations: + `docker exec -it $(docker ps --filter name=srv-captain--$$cap_appname -q) sh -c "/app/bin/docker-entrypoint create_db"` + + You can access your Redash instance at `http://$$cap_appname.$$cap_root_domain`. + variables: + - id: $$cap_REDASH_VERSION + label: Application | Version + description: Redash version. Check out their valid tags at https://hub.docker.com/r/redash/redash/tags + defaultValue: '10.1.0.b50633' + validRegex: /.{1,}/ + - id: $$cap_REDASH_WEB_WORKERS + label: Application | Web Worker Count + description: Amount of web workers. + defaultValue: 4 + validRegex: /.{1,}/ + - id: $$cap_REDASH_SCHEDULER_WORKERS + label: Application | Scheduler Worker Count + description: Amount of workers for scheduler. + defaultValue: 1 + validRegex: /.{1,}/ + - id: $$cap_REDASH_SCHEDULED_WORKERS + label: Application | Scheduled Worker Count + description: Amount of scheduled workers. + defaultValue: 1 + validRegex: /.{1,}/ + - id: $$cap_REDASH_ADHOC_WORKERS + label: Application | Ad-Hoc Worker Count + description: Amount of ad-hoc workers. + defaultValue: 2 + validRegex: /.{1,}/ + - id: $$cap_REDASH_COOKIE_SECRET + label: Application | Cookie Secret + description: Secret for signing cookies. + defaultValue: $$cap_gen_random_hex(64) + validRegex: /.{1,}/ + - id: $$cap_REDASH_SECRET_KEY + label: Application | Application Secret + description: Secret for encrypting settings. + defaultValue: $$cap_gen_random_hex(64) + validRegex: /.{1,}/ + - id: $$cap_REDASH_MAIL_SERVER + label: Application | SMTP Host + description: SMTP server for system mail delivery. This is optional. + - id: $$cap_REDASH_MAIL_PORT + label: Application | SMTP Port + description: SMTP port for system mail delivery. + defaultValue: 25 + validRegex: /.{1,}/ + - id: $$cap_REDASH_MAIL_USERNAME + label: Application | SMTP Username + description: SMTP user name for system mail delivery. This is optional. + - id: $$cap_REDASH_MAIL_PASSWORD + label: Application | SMTP Password + description: SMTP password for system mail delivery. This is optional. + - id: $$cap_REDASH_MAIL_DEFAULT_SENDER + label: Application | SMTP Default Sender + description: Mail address to send from. This is optional. + - id: $$cap_REDASH_MAIL_USE_TLS + label: Application | SMTP Use TLS + description: Whether to use TLS for system mail delivery through SMTP. + defaultValue: 'false' + validRegex: /^(true|false)$/ + - id: $$cap_REDASH_MAIL_USE_SSL + label: Application | SMTP Use SSL + description: Whether to use SSL for system mail delivery through SMTP. + defaultValue: 'false' + validRegex: /^(true|false)$/ + - id: $$cap_REDIS_VERSION + label: Queue | Version + description: Redis version. Check out their valid tags at https://hub.docker.com/_/redis/tags + defaultValue: '7.0-alpine' + validRegex: /.{1,}/ + - id: $$cap_POSTGRES_VERSION + label: Database | Version + description: PostgreSQL version. Check out their valid tags at https://hub.docker.com/_/postgres/tags + defaultValue: '15.0-alpine' + validRegex: /.{1,}/ + - id: $$cap_POSTGRES_DB + label: Database | Name + description: Name of the PostgreSQL database. + defaultValue: redash + validRegex: /.{1,}/ + - id: $$cap_POSTGRES_USER + label: Database | User Name + description: Name of the PostgreSQL user. + defaultValue: redash + validRegex: /.{1,}/ + - id: $$cap_POSTGRES_PASSWORD + label: Database | User Password + description: Password of the PostgreSQL user. + defaultValue: $$cap_gen_random_hex(16) + validRegex: /.{1,}/ diff --git a/public/v4/logos/redash.png b/public/v4/logos/redash.png new file mode 100644 index 0000000..2a71b8c Binary files /dev/null and b/public/v4/logos/redash.png differ