added www
This commit is contained in:
1
www/assets/css/bulma.css.map
Normal file
1
www/assets/css/bulma.css.map
Normal file
File diff suppressed because one or more lines are too long
1
www/assets/css/bulma.min.css
vendored
Normal file
1
www/assets/css/bulma.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
www/assets/images/favicon.svg
Normal file
7
www/assets/images/favicon.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" fill="#209cee">
|
||||
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
||||
|
||||
|
After Width: | Height: | Size: 877 B |
75
www/index.php
Normal file
75
www/index.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>LAMP STACK</title>
|
||||
<link rel="shortcut icon" href="/assets/images/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/assets/css/bulma.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<section class="hero is-medium is-info is-bold">
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-centered">
|
||||
<h1 class="title">
|
||||
LAMP STACK
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Your local development environment
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h3 class="title is-3 has-text-centered">Environment</h3>
|
||||
<hr>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><?= apache_get_version(); ?></li>
|
||||
<li>PHP <?= phpversion(); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
$link = mysqli_connect("database", "root", $_ENV['MYSQL_ROOT_PASSWORD'], null);
|
||||
|
||||
/* check connection */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("MySQL connecttion failed: %s", mysqli_connect_error());
|
||||
} else {
|
||||
/* print server version */
|
||||
printf("MySQL Server %s", mysqli_get_server_info($link));
|
||||
}
|
||||
/* close connection */
|
||||
mysqli_close($link);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title is-3 has-text-centered">Quick Links</h3>
|
||||
<hr>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li><a href="/phpinfo.php">phpinfo()</a></li>
|
||||
<li><a href="http://localhost:<? print $_ENV['PMA_PORT']; ?>">phpMyAdmin</a></li>
|
||||
<li><a href="/test_db.php">Test DB Connection with mysqli</a></li>
|
||||
<li><a href="/test_db_pdo.php">Test DB Connection with PDO</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<strong><a href="https://www.sprintcube.com" target="_blank">SprintCube</a></strong><br>
|
||||
The source code is released under the <a href="https://github.com/sprintcube/docker-compose-lamp/blob/master/LICENSE" target="_blank">MIT license</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
3
www/phpinfo.php
Normal file
3
www/phpinfo.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
|
||||
13
www/test_db.php
Normal file
13
www/test_db.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$link = mysqli_connect("database", "root", $_ENV['MYSQL_ROOT_PASSWORD'], null);
|
||||
|
||||
if (!$link) {
|
||||
echo "Error: Unable to connect to MySQL." . PHP_EOL;
|
||||
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
|
||||
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
|
||||
echo "Success: A proper connection to MySQL was made! The docker database is great." . PHP_EOL;
|
||||
|
||||
mysqli_close($link);
|
||||
15
www/test_db_pdo.php
Normal file
15
www/test_db_pdo.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
$DBuser = 'root';
|
||||
$DBpass = $_ENV['MYSQL_ROOT_PASSWORD'];
|
||||
$pdo = null;
|
||||
|
||||
try{
|
||||
$database = 'mysql:host=database:3306';
|
||||
$pdo = new PDO($database, $DBuser, $DBpass);
|
||||
echo "Success: A proper connection to MySQL was made! The docker database is great.";
|
||||
} catch(PDOException $e) {
|
||||
echo "Error: Unable to connect to MySQL. Error:\n $e";
|
||||
}
|
||||
|
||||
$pdo = null;
|
||||
Reference in New Issue
Block a user