dionisvl / docker.lemp.example

Docker lemp stack example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nginx PHP MySQL

Docker running Nginx, PHP-FPM, MySQL and PHPMyAdmin.

Images to use

You should be careful when installing third party web servers such as MySQL or Nginx.

This project use the following ports :

Server Port
MySQL 8989
PHPMyAdmin 8080
Nginx 8000
Nginx SSL 3000

Connecting MySQL from PDO

<?php
    try {
        $dsn = 'mysql:host=mysql;dbname=test;charset=utf8;port=3306';
        $pdo = new PDO($dsn, 'dev', 'dev');
    } catch (PDOException $e) {
        echo $e->getMessage();
    }

Sources

About

Docker lemp stack example


Languages

Language:Makefile 44.5%Language:Dockerfile 26.3%Language:PHP 23.3%Language:Shell 5.9%