Pasar al contenido principal
Monoforms Web Development
CAPTCHA
1 + 0 =
Resuelva este simple problema matemático y escriba la solución; por ejemplo: Para 1+3, escriba 4.
Esta pregunta es para comprobar si usted es un visitante humano y prevenir envíos de spam automatizado.

Main navigation

  • Home
  • Sobre mi
  • Contacto
CAPTCHA
8 + 3 =
Resuelva este simple problema matemático y escriba la solución; por ejemplo: Para 1+3, escriba 4.
Esta pregunta es para comprobar si usted es un visitante humano y prevenir envíos de spam automatizado.

Sobrescribir enlaces de ayuda a la navegación

  1. Home
  2. LARAVEL SAIL AND SQL SERVER DRIVER

LARAVEL SAIL AND SQL SERVER DRIVER

By peter, 18 Junio, 2021
SQL-Azure-laravel-sail

Laravel Sail is a lightweight command-line interface for running Laravel applications using Docker as the underlying containerization technology. It provides a simple way to set up a development environment for Laravel applications that includes all the necessary dependencies and services, such as PHP, Nginx, and MySQL. However, until recently, one of the limitations of Laravel Sail was the lack of support for Microsoft SQL Server, which is a popular database management system used by many enterprise applications.

> Note: this Dockerfile don't add SQL Server container. Only add ODB Driver for SQL Server and PHP Driver for SQL Server, I use an azure DB

  1. Create the alias to sail.

    alias sail='bash vendor/bin/sail'
    
  2. Build the container with:

    sail up
    
  3. Publish the Dockerfile:

    sail artisan sail:publish
    

    This command create a docker directory in your application's root directory.

  4. Customize the Dockerfile: in docker/8.0/ folder open the Dockerfile and add the entries for ODBC Driver for SQL Server and PHP Driver for SQL Server. Check this links:

    • https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15

    • https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#ubuntu17

    • https://www.microsoft.com/en-us/sql-server/developer-get-started/php/ubuntu/step/2.html

    Can you take my Dockerfile configuration in the gist: https://gist.github.com/Sirpyerre/1db05b2ca681ea680646259805aee293

  5. Check the context for docker-compose.yml and remove or comment the entries for MySQL:

    build:
        context: ./docker/8.0
        dockerfile: Dockerfile
        args:
            WWWGROUP: '${WWWGROUP}'
    

    Example in: https://gist.github.com/Sirpyerre/b59d7e3c3bd00d9e29adb31cd386730b

  6. Rebuild your application's containers using the build command:

    sail build --no-cache
    

Check the documentation for Laravel Sail: https://laravel.com/docs/8.x/sail#introduction

>Thank you for read.

Contenido reciente

  • Como limpiar usings sin usar en Rider
  • Instalando apache, mysql y php en Ubuntu
  • Cómo liberé 12GB en mi servidor y reviví mi sitio web (sin llorar… mucho)
  • ¿Que son los sitios web agregadores y los anuncios clasificados?
  • Mi Experiencia con Docker, Podman y Kubernetes
  • Lo más destacado del AWS User Group Puebla
  • Docker: Ignorar el directorio vendor en un proyecto de Go.
  • Instala Kubernetes en Ubuntu 22.04 para pruebas
  • Serverless, Lambda y Kubernetes: Fundamentos para la nube
  • Ejecuta tu lambda de Golang en AWS SAM de forma local

Recomendados

  • Biodiv
  • Medium
RSS feed

Política de privacidad

Términos de uso

Recomendados

  • Biodiv
  • Medium
Powered by Drupal

Monoforms ©2021 Created by Pedro Rojas Reyes