Merge branch 'yeeeean'
commit
adca290bf1
14
README.md
14
README.md
|
@ -1,5 +1,8 @@
|
|||
# Git based automatic web deployment system
|
||||
This repository will be automagically pulled by the web server each time something is pushed by a user. The following files and directories are linked to areas where they can be accessed by the web server:
|
||||
This repository will be automagically pulled by the web server each time something is pushed by a user.
|
||||
|
||||
## Symlinks
|
||||
The following files and directories are linked to areas where they can be accessed by the web server:
|
||||
* `index.html` → `*/common/index.html` (the website as seen by the majority of the users, maybe a login page?)
|
||||
* `icon.png` → `*/common/icon.png` (self-explanatory)
|
||||
* `stylesheet.css` → `*/common/stylesheet.css` (self-explanatory)
|
||||
|
@ -10,8 +13,13 @@ This repository will be automagically pulled by the web server each time somethi
|
|||
* `commands_status.conf` → `strassenkind.ip/commands_status.conf`
|
||||
* `commands_ondemand.conf` → `strassenkind.ip/commands_ondemand.conf`
|
||||
|
||||
## Some server variables that might turn out to be useful:
|
||||
## Variables handled by the deployment script
|
||||
Here is the place for variables that will be replaced automatically on the server. Using them is encouraged. Using the paths is DISCOURAGED.
|
||||
This way, it is possible to change folder names around and fix the URLs in one place for all files simultaneously.
|
||||
* `%CONTENT_DIR%` → The part of the URL between the domain name and the destination (e.g. https://lostcave.ddnss.de**/common/content/**about/)
|
||||
|
||||
## Some server variables that might turn out to be useful (example):
|
||||
{
|
||||
"HTTP_USER_AGENT":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko\/20100101 Firefox\/73.0",
|
||||
"REMOTE_ADDR":"10.1.1.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>
|
||||
About us...
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="/common/content/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css" />
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -20,7 +20,7 @@
|
|||
Who we are
|
||||
</h2>
|
||||
<div class="image_container">
|
||||
<img src="/common/content/img/group.jpg" alt="Image of the team" />
|
||||
<img src="%CONTENT_DIR%/img/group.jpg" alt="Image of the team" />
|
||||
<p class="image_container">
|
||||
From left to right: Ilja, Jakob, Jan [me], and Erik
|
||||
</p>
|
||||
|
@ -34,7 +34,7 @@
|
|||
About the server
|
||||
</h2>
|
||||
<div class="image_container">
|
||||
<img src="/common/content/img/server.jpg" alt="Image of the server">
|
||||
<img src="%CONTENT_DIR%/img/server.jpg" alt="Image of the server">
|
||||
<p class="image_container">
|
||||
The server at its current place in the basement
|
||||
</p>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
||||
</head>
|
||||
<body>
|
||||
<p> Nope. </p>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Home page</title>
|
||||
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/stylesheet.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul class="topnav">
|
||||
<li><a class="active" href="#home">Home</a></li>
|
||||
<li><a href="#news">News</a></li>
|
||||
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
||||
<li class="right"><a href="%CONTENT_DIR%/login/">Log In</a></li>
|
||||
</ul>
|
||||
|
||||
<div style="padding:0 16px;">
|
||||
<h2>ThreadR Homepage</h2>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<h4></h4>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>ThreadR - Welcome</title>
|
||||
<link rel="stylesheet" type="text/css" href="/common/content/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<ul class="topnav">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="%CONTENT_DIR%/">Home</a></li>
|
||||
<li><a href="#news">News</a></li>
|
||||
<li><a href="/common/content/about/">About</a></li>
|
||||
<li class="right"><a class="active" href="login.html">Log In</a></li>
|
||||
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
||||
<li class="right"><a class="active" href="%CONTENT_DIR%/login/">Log In</a></li>
|
||||
</ul>
|
||||
|
||||
<div style="padding:0 16px;">
|
||||
|
@ -25,21 +25,24 @@
|
|||
</div>
|
||||
<div class="item-2 round-border">
|
||||
<p>Login:</p>
|
||||
<form action="/common/content/login/redirect.php" method="post">
|
||||
<form action="%CONTENT_DIR%/login/redirect.php" method="post">
|
||||
<input type="text" name="name" maxlength="20" placeholder="Username" />
|
||||
<input type="password" name="password" maxlength="256" placeholder="Password" />
|
||||
<p></p>
|
||||
<a href="/common/"> <button> Log in </button> </a>
|
||||
<input type="submit" value="Log in" />
|
||||
<!--
|
||||
@Ilja: HTML button tags are only useful in conjuction to JavaScript or in little hacks like my <a> + <button>. In HTML forms, there is a special type of button for submitting forms (see above).
|
||||
-->
|
||||
</form>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="item-3">
|
||||
<p></p>
|
||||
<a href="/common/content/signup/"> <button> Sign up </button> </a>
|
||||
<a href="%CONTENT_DIR%/signup/"> <button> Sign up </button> </a>
|
||||
<p></p>
|
||||
</div>
|
||||
<!-- <div class="item-4">
|
||||
<center><a href="https://lostcave.ddnss.de/common/content/about/">About</a></center>
|
||||
<center><a href="https://lostcave.ddnss.de%CONTENT_DIR%/about/">About</a></center>
|
||||
</div> -->
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Sign Up</title>
|
||||
<link rel="stylesheet" type="text/css" href="/common/content/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<ul class="topnav">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="#news">News</a></li>
|
||||
<li><a href="/common/content/about">About</a></li>
|
||||
<li class="right"><a href="login.html">Log In</a></li>
|
||||
<li><a href="%CONTENT_DIR%/">Home</a></li>
|
||||
<li><a href="%CONTENT_DIR%/news/">News</a></li>
|
||||
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
||||
<li class="right"><a href="%CONTENT_DIR%/login/">Log In</a></li>
|
||||
</ul>
|
||||
|
||||
<div style="padding:0 16px;">
|
||||
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<div class="item-2 round-border">
|
||||
<p>Sign Up:</p>
|
||||
<form action="/common/content/signup/redirect.php" method="post">
|
||||
<form action="%CONTENT_DIR%/signup/redirect.php" method="post">
|
||||
<p>Benutzername: <input type="text" name="user" placeholder="Benutzername"/> </p>
|
||||
<p>E-Mail: <input type="text" name="email" placeholder="yeet@example.com"/> </p>
|
||||
<p>Passwort: <input type="password" name="password" placeholder="Passwort"/> </p>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<head>
|
||||
<title>ThreadR</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1> ThreadR </h1>
|
||||
<h2> Welcome back, <?php echo $_GET['username']; ?>!</h2>
|
||||
|
||||
<h2> Welcome back, <?php echo $_SESSION['username']; ?>!</h2>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;./common/" />
|
||||
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
||||
</head>
|
||||
<body>
|
||||
<p> Your browser seems to not support redirects. <br />
|
||||
Please klick the following link to continue: <a href="./common/"> Go to home page... </a></p>
|
||||
Please klick the following link to continue: <a href="%CONTENT_DIR%/"> Go to home page... </a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,5 +3,9 @@ echo "Deployment script for repository \"web-deployment\"
|
|||
`date`
|
||||
=============================================================================="
|
||||
|
||||
echo "Replacing %CONTENT_DIR% in all HTML and PHP files."
|
||||
CONTENT_DIR="/common/content"
|
||||
echo -e "`find ./ -name '*.html' -or -name '*.php' | sed "s/^/workingfile=\'/;s/\$/\'\; cat \\\$workingfile > .\/tmpdeploymentfile\; cat tmpdeploymentfile | sed \'s#%CONTENT_DIR%#\$CONTENT_DIR#\' > \\\$workingfile/"`\nrm tmpdeploymentfile" | bash -
|
||||
|
||||
echo "==============================================================================
|
||||
Done."
|
||||
|
|
31
index.html
31
index.html
|
@ -1,27 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Home page</title>
|
||||
<link rel="stylesheet" type="text/css" href="/common/content/stylesheet.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul class="topnav">
|
||||
<li><a class="active" href="#home">Home</a></li>
|
||||
<li><a href="#news">News</a></li>
|
||||
<li><a href="/common/content/about/">About</a></li>
|
||||
<li class="right"><a href="/common/content/login/">Log In</a></li>
|
||||
</ul>
|
||||
|
||||
<div style="padding:0 16px;">
|
||||
<h2>ThreadR Homepage</h2>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<h4></h4>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
||||
</head>
|
||||
<body>
|
||||
<p> Your browser seems to not support redirects. <br />
|
||||
Please klick the following link to continue: <a href="%CONTENT_DIR%/"> Go to home page... </a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ echo "Done.";
|
|||
<html>
|
||||
<head>
|
||||
<title> Strassenkind Server Status Page </title>
|
||||
<link rel="stylesheet" type="text/css" href="./common/content/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href=".%CONTENT_DIR%/style.css" />
|
||||
<?php
|
||||
if (!isset($_POST['ondemand'])) {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"20\" />";
|
||||
|
|
Loading…
Reference in New Issue