Skip to content

Fast and easy deployment examples of services that can be used as Appsmith Datasources.

Notifications You must be signed in to change notification settings

AbdulIndia/appsmith-quick-datasources

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appsmith Lightning Datasources

We know that setting up Datasources in Appsmith is fast and easy, but sometimes setting up the services you want to connect to is not as easy.

This project aims to provide fast and easy steps to set up such services so that you can get to hacking around with Appsmith as soon as possible.

Notes

  • The deployment instructions provided here are not suited for production use, please use them for testing and POCs only.
  • On Linux, docker commands must be run as administrator.
  • If you are deploying this on a hosting provider, you will need to use Ngrok to get a usable URL to connect to. If you use this locally, just remember to use localhost.
  • Example how to get Ngrok host and port to make connections.
appsmith@ngrok:~$ ngrok tcp 3306
Session Status   
online                                                                                   
Account                       Appsmith-svg (Plan: Free)                                                                  
Version                       3.1.0                                                                                     
Region                        Europe (eu)                                                                               
Latency                       164ms                                                                                    
Web Interface                 http://127.0.0.1:4040                                                                     
Forwarding                    tcp://0.tcp.eu.ngrok.io:16696 -> localhost:3306 
Connections                  
ttl     opn     rt1     rt5     p50     p90                                                                            
0       0       0.00    0.00    0.00    0.00                                                                                 
  • For example, the host and the port to make that connection would be.

host: 0.tcp.eu.ngrok.io port: 16696

General Requirements

Service Setup

🌿 MongoDB

  1. Copy the provided docker-compose.yaml for MongoDB.
version: '3.1'
services:
  mongodb:
    image: mongo:6.0
    restart: always
    container_name: mongodb
    environment:
      MONGO_INITDB_ROOT_USERNAME: appsmith
      MONGO_INITDB_ROOT_PASSWORD: appsmith
    ports:
      - "27017:27017"
  1. Run the deployment.
docker-compose up -d docker-compose.yaml

Note: There is a version that uses a seed, in case you want to test with a DB with data

docker-compose -f docker-compose.seeded.yaml up -d
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 27017
  1. Follow our guide to create a MongoDB Datasource.

    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. Happy hacking!

🐬 MySQL

  1. Copy the provided docker-compose.yaml for MySQL.
version: '3.3'
services:
  mysql:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: 'db'
      MYSQL_USER: 'appsmith'
      MYSQL_PASSWORD: 'appsmith'
    ports:
      - '3306:3306'
    expose:
      - '3306'
    volumes:
      - my-db:/var/lib/mysql
volumes:
  my-db:
  1. Run the deployment.
docker-compose up -d docker-compose.yaml

Note: There is a version that uses a seed, in case you want to test with a DB with data

docker-compose -f docker-compose.seeded.yaml up -d
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 3306
  1. Follow our guide to create a MySQL Datasource.

    • Use the URL provided by the Ngrok command as the host in your connection settings.

    Note: disable the SSL

  2. Happy hacking!

🐘 PostgreSQL

  1. Copy the provider docker-compose.ymlfor PostgreSQL
version: '3'
services:
  postgres:
          image: 'postgres:12'
          restart: always
          volumes:
          - './postgres_data:/var/lib/postgresql/data'
          environment:
          - POSTGRES_PASSWORD=appsmith
          ports:
          - '5432:5432'
  1. Run the deployment.
docker-compose up -d docker-compose.yaml 

Note: There is a version that uses a seed, in case you want to test with a DB with data

docker-compose -f docker-compose.seeded.yaml up -d
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 5432
  1. Follow our guide to create a PostgreSQL.
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. Host and port are given by ngrok
  3. Database name postgres
  4. User postgres
  5. Password secure_pass_here
  6. Happy hacking!

🟥 Redis

  1. Copy the provider docker-compose.yml for Redis.
version: '2'

services:
  redis:
    image: docker.io/bitnami/redis:7.0
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
    ports:
      - '6379:6379'
    volumes:
      - 'redis_data:/bitnami/redis/data'

volumes:
  redis_data:
    driver: local
  1. Run the deployment.
docker-compose up -d docker-compose.yaml 
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 6379
  1. Follow our guide to create a Redis.
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. Host and port are given by ngrok
  3. Happy hacking!

ElasticSearch

  1. Copy the provider docker-compose.yml for ElasticSearch.
version: "3.0"
services:
  elasticsearch:
    container_name: es-container
    image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
    environment:
      - xpack.security.enabled=false
      - "discovery.type=single-node"
    networks:
      - es-net
    ports:
      - 9200:9200
  kibana:
    container_name: kb-container
    image: docker.elastic.co/kibana/kibana:7.11.0
    environment:
      - ELASTICSEARCH_HOSTS=http://es-container:9200
    networks:
      - es-net
    depends_on:
      - elasticsearch
    ports:
      - 5601:5601
networks:
  es-net:
    driver: bridge

Note: This installation may take a long time.

  1. Run the deployment.
docker-compose up -d docker-compose.yaml 
  1. Open a terminal and create a reachable URL via Ngrok with the following command
ngrok http 9200
  1. Follow our guide to create a form ElasticSearch ElasticSearch.
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. The port for the connection is 443
  3. Happy hacking!

SqlServer

  1. Copy the provider docker-compose.yml for SqlServer.
version: '3.9'
services:
  mssql:
    image: mcr.microsoft.com/mssql/server:2017-CU31-ubuntu-18.04
    ports:
      - 1433:1433
    volumes:
      - ~/apps/mssql/data:/var/lib/mssqlql/data
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=Appsmith1!
  1. Run the deployment.
docker-compose up -d docker-compose.yaml 

Note: There is a version that uses a seed, in case you want to test with a DB with data

  • Navigate to the path sqlserver/seeded
    cd sqlserver/seeded
  • Run the command.
    docker-compose -f docker-compose.seeded.yaml up -d
    
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 1433 
  1. Follow our guide to create a SqlServer
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. default database name: master
  3. Username: sa
  4. Password: Appsmith1!
  5. Happy hacking!

📧 SMTP

  1. Copy the provider docker-compose.yml for SMTP
version: '3'
services:
  mail:
    image: bytemark/smtp
    restart: always
    ports:
     - "25:25"
    environment:
      RELAY_HOST: smtp.gmail.com
      RELAY_PORT: 587
      RELAY_USERNAME: appsmith
      RELAY_PASSWORD: appsmith
  1. Run the deployment.
docker-compose up -d docker-compose.yaml
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
 ngrok tcp 25 
  1. Follow our guide to create an SMTP
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. The password and username are appsmith
  3. Happy hacking!

🥑 ArangoDB

  1. Copy the provider docker-compose.yml for ArangoDB
version: '3.7'
services:
  arangodb_db_container:
    image: arangodb:3.2.2
    environment:
      ARANGO_ROOT_PASSWORD: appsmith
    ports:
      - 8529:8529
  1. Run the deployment.
docker-compose up -d docker-compose.yaml 

Note: There is a version that uses a seed, in case you want to test with a DB with data

docker-compose -f docker-compose.seeded.yaml up -d
  1. Open a terminal and create a reachable URL via Ngrok with the following command.
ngrok tcp 8529
  1. Follow our guide to create an ArangoDB
    • Use the URL provided by the Ngrok command as the host in your connection settings.
  2. Database name: _system
  3. User: appsmith
  4. Password: appsmith

Configuring other data sources

➡️DynamoDB

  1. Create an AWS account
  2. Enter the AWS shell, whether it is the cloud or the local
  3. copy this command to create a table
aws dynamodb create-table --table-name Music --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --table-class STANDARD
  1. We will verify that the table is active with the following command
aws dynamodb describe-table --table-name Music | grep TableStatus
  1. Get your access credentials and your region
  2. Follow our guide to create a DynamoDB

🪁 S3

  1. Create an AWS account
  2. Enter the AWS shell, whether it is the cloud or the local
  3. We create a s3 bucket: aws s3 mb s3://bucket-appsmith
  4. We list our buckets: aws s3 ls
  5. Follow our guide to create a S3

🔥 Firestore

  1. We install Gcloud
  2. We will follow the following commands.
  3. We create a new project. gcloud projects create appsmithfirestore
  4. We list the project. gcloud project list
  5. We select the project gcloud config set project appsmithfirestore
  6. We create an application gcloud app create
  7. Create the database gcloud firestore databases create --region=us-east1
  8. Database URL https://appsmithfirestore.firebaseio.com
  9. Follow our guide to creating a Firestore

About

Fast and easy deployment examples of services that can be used as Appsmith Datasources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 37.8%
  • Shell 28.5%
  • TSQL 25.2%
  • Dockerfile 8.5%