Merge branch 'yeeeean'
commit
adca290bf1
12
README.md
12
README.md
|
@ -1,5 +1,8 @@
|
||||||
# Git based automatic web deployment system
|
# 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?)
|
* `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)
|
* `icon.png` → `*/common/icon.png` (self-explanatory)
|
||||||
* `stylesheet.css` → `*/common/stylesheet.css` (self-explanatory)
|
* `stylesheet.css` → `*/common/stylesheet.css` (self-explanatory)
|
||||||
|
@ -10,7 +13,12 @@ This repository will be automagically pulled by the web server each time somethi
|
||||||
* `commands_status.conf` → `strassenkind.ip/commands_status.conf`
|
* `commands_status.conf` → `strassenkind.ip/commands_status.conf`
|
||||||
* `commands_ondemand.conf` → `strassenkind.ip/commands_ondemand.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",
|
"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"
|
"REMOTE_ADDR":"10.1.1.3"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>
|
<title>
|
||||||
About us...
|
About us...
|
||||||
</title>
|
</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" />
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
Who we are
|
Who we are
|
||||||
</h2>
|
</h2>
|
||||||
<div class="image_container">
|
<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">
|
<p class="image_container">
|
||||||
From left to right: Ilja, Jakob, Jan [me], and Erik
|
From left to right: Ilja, Jakob, Jan [me], and Erik
|
||||||
</p>
|
</p>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
About the server
|
About the server
|
||||||
</h2>
|
</h2>
|
||||||
<div class="image_container">
|
<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">
|
<p class="image_container">
|
||||||
The server at its current place in the basement
|
The server at its current place in the basement
|
||||||
</p>
|
</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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Welcome</title>
|
<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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<ul class="topnav">
|
<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="#news">News</a></li>
|
||||||
<li><a href="/common/content/about/">About</a></li>
|
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
||||||
<li class="right"><a class="active" href="login.html">Log In</a></li>
|
<li class="right"><a class="active" href="%CONTENT_DIR%/login/">Log In</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div style="padding:0 16px;">
|
<div style="padding:0 16px;">
|
||||||
|
@ -25,21 +25,24 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-2 round-border">
|
<div class="item-2 round-border">
|
||||||
<p>Login:</p>
|
<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="text" name="name" maxlength="20" placeholder="Username" />
|
||||||
<input type="password" name="password" maxlength="256" placeholder="Password" />
|
<input type="password" name="password" maxlength="256" placeholder="Password" />
|
||||||
<p></p>
|
<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>
|
</form>
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-3">
|
<div class="item-3">
|
||||||
<p></p>
|
<p></p>
|
||||||
<a href="/common/content/signup/"> <button> Sign up </button> </a>
|
<a href="%CONTENT_DIR%/signup/"> <button> Sign up </button> </a>
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item-4">
|
<!-- <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> -->
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Sign Up</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<ul class="topnav">
|
<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="%CONTENT_DIR%/news/">News</a></li>
|
||||||
<li><a href="/common/content/about">About</a></li>
|
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
||||||
<li class="right"><a href="login.html">Log In</a></li>
|
<li class="right"><a href="%CONTENT_DIR%/login/">Log In</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div style="padding:0 16px;">
|
<div style="padding:0 16px;">
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-2 round-border">
|
<div class="item-2 round-border">
|
||||||
<p>Sign Up:</p>
|
<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>Benutzername: <input type="text" name="user" placeholder="Benutzername"/> </p>
|
||||||
<p>E-Mail: <input type="text" name="email" placeholder="yeet@example.com"/> </p>
|
<p>E-Mail: <input type="text" name="email" placeholder="yeet@example.com"/> </p>
|
||||||
<p>Passwort: <input type="password" name="password" placeholder="Passwort"/> </p>
|
<p>Passwort: <input type="password" name="password" placeholder="Passwort"/> </p>
|
||||||
|
|
|
@ -5,5 +5,4 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1> ThreadR </h1>
|
<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>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="0;./common/" />
|
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p> Your browser seems to not support redirects. <br />
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,5 +3,9 @@ echo "Deployment script for repository \"web-deployment\"
|
||||||
`date`
|
`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 "==============================================================================
|
echo "==============================================================================
|
||||||
Done."
|
Done."
|
||||||
|
|
31
index.html
31
index.html
|
@ -1,27 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Home page</title>
|
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
||||||
<link rel="stylesheet" type="text/css" href="/common/content/stylesheet.css">
|
</head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<body>
|
||||||
|
<p> Your browser seems to not support redirects. <br />
|
||||||
</head>
|
Please klick the following link to continue: <a href="%CONTENT_DIR%/"> Go to home page... </a></p>
|
||||||
<body>
|
</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>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ echo "Done.";
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title> Strassenkind Server Status Page </title>
|
<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
|
<?php
|
||||||
if (!isset($_POST['ondemand'])) {
|
if (!isset($_POST['ondemand'])) {
|
||||||
echo "<meta http-equiv=\"refresh\" content=\"20\" />";
|
echo "<meta http-equiv=\"refresh\" content=\"20\" />";
|
||||||
|
|
Loading…
Reference in New Issue