Sign inSign up

hlxzhou/php-sqlsrv

By hlxzhou

•Updated over 6 years ago

php7-fpm connect sqlserver database;

Image
0

1.2K

hlxzhou/php-sqlsrv repository overview

docker-compose.yml

version: "3.4"
services:
  web:
    image: nginx:1.14.1
    container_name: web-nginx
    restart: always
    ports:
      - "80:80"
      - "8080:8080"
      - "443:443"
    depends_on:
      - php
    volumes:
      - ./web:/var/www
      - ./conf.d/nginx:/etc/nginx/conf.d
      - ./log/nginx:/var/log/nginx
  php:
    image: hlxzhou/php-sqlsrv:v1
    container_name: php-fpm
    ports:
      - "9000:9000"
    volumes:
      - ./web:/var/www
      - ./log/fpm:/var/log

nginx.conf

server {
    listen          80;
    index           index.php index.html;
    server_name     _;
    root            /var/www/test1;
    
    access_log      /var/log/nginx/access.log;
    error_log       /var/log/nginx/error.log;

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass php-fpm:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }
}

Tag summary

Content type

Image

Digest

Size

198.9 MB

Last updated

over 6 years ago

docker pull hlxzhou/php-sqlsrv