-
-
Save hemaprasad05/f3576de1d443750bf35edd0cf3b3a0d5 to your computer and use it in GitHub Desktop.
Revisions
-
jcavat revised this gist
Mar 14, 2017 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,7 @@ services: MYSQL_ROOT_PASSWORD: test volumes: - ./dump:/docker-entrypoint-initdb.d - persistent:/var/lib/mysql networks: - default phpmyadmin: @@ -33,5 +34,5 @@ services: MYSQL_USER: user MYSQL_PASSWORD: test MYSQL_ROOT_PASSWORD: test volumes: persistent: -
jcavat revised this gist
Mar 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ <?php $conn = mysqli_connect('db', 'user', 'test', "myDb"); $query = 'SELECT * From Person'; -
jcavat revised this gist
Mar 13, 2017 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,6 @@ <?php $conn = mysqli_connect('db', 'user', 'merde', "myDb"); @@ -38,7 +36,6 @@ } echo '</table>'; $result->close(); mysqli_close($conn); -
jcavat revised this gist
Mar 13, 2017 . 2 changed files with 11 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Create this directories structure: . ├── docker-compose.yml ├── Dockerfile ├── dump │ └── myDb.sql ├── sessions └── www └── index.php
-
jcavat revised this gist
Mar 13, 2017 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ Create this directories structure: . - docker-compose.yml - Dockerfile - dump - myDb.sql - sessions - www - index.php
-
jcavat revised this gist
Mar 13, 2017 . No changes.There are no files selected for viewing
-
jcavat revised this gist
Mar 13, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,3 +7,4 @@ Create this directories structure: ├── sessions └── www └── index.php
-
jcavat revised this gist
Mar 13, 2017 . 2 changed files with 58 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Create this directories structure: . ├── docker-compose.yml ├── Dockerfile ├── dump │ └── myDb.sql ├── sessions └── www └── index.php This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ <!-- put in ./www directory --> <html> <head> <title>Hello...</title> <meta charset="utf-8"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <?php echo "<h1>Hi! I'm happy</h1>"; ?> <?php // Connexion et sélection de la base //$conn = mysqli_connect('172.19.0.2', 'user', 'merde', "myDb"); $conn = mysqli_connect('db', 'user', 'merde', "myDb"); $query = 'SELECT * From Person'; $result = mysqli_query($conn, $query); echo '<table class="table table-striped">'; echo '<thead><tr><th></th><th>id</th><th>name</th></tr></thead>'; while($value = $result->fetch_array(MYSQLI_ASSOC)){ echo '<tr>'; echo '<td><a href="#"><span class="glyphicon glyphicon-search"></span></a></td>'; foreach($value as $element){ echo '<td>' . $element . '</td>'; } echo '</tr>'; } echo '</table>'; /* Libération du jeu de résultats */ $result->close(); mysqli_close($conn); ?> </div> </body> </html> -
jcavat revised this gist
Mar 13, 2017 . 2 changed files with 28 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ FROM php:7.1.2-apache RUN docker-php-ext-install mysqli This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ -- put in ./dump directory SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; CREATE TABLE `Person` ( `id` int(11) NOT NULL, `name` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `Person` (`id`, `name`) VALUES (1, 'William'), (2, 'Marc'), (3, 'John'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -
jcavat created this gist
Mar 13, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ version: "2" services: www: build: . ports: - "8001:80" volumes: - ./www:/var/www/html/ links: - db networks: - default db: image: mysql ports: - "3306:3306" environment: MYSQL_DATABASE: myDb MYSQL_USER: user MYSQL_PASSWORD: test MYSQL_ROOT_PASSWORD: test volumes: - ./dump:/docker-entrypoint-initdb.d networks: - default phpmyadmin: image: phpmyadmin/phpmyadmin links: - db:db ports: - 8000:80 environment: MYSQL_USER: user MYSQL_PASSWORD: test MYSQL_ROOT_PASSWORD: test volumes: - /sessions