MSSQL

MSSQL lets you build intelligent, mission-critical applications using a scalable, hybrid database platform that has everything built in—from in-memory performance and advanced security to in-database analytics. You can easily add it to your Lando app by adding an entry to the services key in your app's .lando.yml.

Supported versions

YOU MUST BOOST YOUR RAM TO USE THIS SERVICE

MSSQL currently requires 4GB of RAM to run, which is above the 2GB default set by Docker. To boost your ram please check out: https://github.com/Microsoft/mssql-docker/issues/114

Example

# The name of the app
name: mssql

# Note: You will need to increase the default memory requirements of your docker
# host in order to run this service
#
# See: https://github.com/Microsoft/mssql-docker/issues/114

# Give me http://mssql.lndo.site and https://mssql.lndo.site
proxy:
  html:
    - mssql.lndo.site

# Set up my services
services:

  # Set up a basic webserver jsut for this example
  html:
    type: nginx
    webroot: www

  # Spin up a mssql container called "database"
  # NOTE: "database" is arbitrary, you could just as well call this "db" or "kanye"
  database:

    # Use mssql (no versions available at this point)
    type: mssql

    # Optionally allow access to the database at localhost:1434
    # You will need to make sure port 1434 is open on your machine
    #
    # You can also set `portforward: true` to have Lando dynamically assign
    # a port. Unlike specifying an actual port setting this to true will give you
    # a different port every time you restart your app
    portforward: 1434

    # Optionally set the default admin password
    # Important note: This password needs to include at least 8 characters of
    # at least three of these four categories:
    #  - uppercase letters
    #  - lowercase letters
    #  - numbers
    #  - non-alphanumeric symbols
    # password: he11oTHERE

tooling:
  sqlcmd:
    service: database
    user: root
  bcp:
    service: database
    user: root

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

Getting information

You can get connection and credential information about your database by running lando info from inside your app.

# Navigate to the app
cd /path/to/app

# Get info (app needs to be running to get this)
lando info

{
  "html": {
    "type": "nginx",
    "version": "latest",
    "webroot": "www",
    "urls": [
      "http://localhost:32774",
      "http://mssql.lndo.site",
      "https://mssql.lndo.site"
    ]
  },
  "database": {
    "type": "mssql",
    "version": "latest",
    "creds": {
      "user": "sa",
      "password": "he11oTHERE"
    },
    "internal_connection": {
      "host": "database",
      "port": 1443
    },
    "external_connection": {
      "host": "localhost",
      "port": "1434"
    }
  }
}

results matching ""

    No results matching ""