Compare commits
No commits in common. "40306538ba89c6ee1a5544b9392917450cfa60f6" and "77508a984ec23b9a87e5268d9d6cd7816c3bc5f9" have entirely different histories.
40306538ba
...
77508a984e
5 changed files with 15 additions and 23 deletions
20
README.md
20
README.md
|
@ -3,41 +3,28 @@
|
||||||
## Setting up the environment
|
## Setting up the environment
|
||||||
|
|
||||||
1. Create a virtual environment:
|
1. Create a virtual environment:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Activate the virtual environment:
|
2. Activate the virtual environment:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Install dependencies:
|
3. Install dependencies:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pip install requirements.txt
|
pip install requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Set the environment variables:
|
4. Set the environment variables:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
export GIT_URL=http://git.adrianux.net
|
||||||
|
export WEBSITE_URL=http://adrianux.net
|
||||||
export DEBUGMODE=False
|
export DEBUGMODE=False
|
||||||
```
|
```
|
||||||
|
|
||||||
Or source the .env file:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cp .env.example .env # change the variables to suit your environment as needed
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
. .env
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Run the app:
|
5. Run the app:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
waitress-serve --listen=0.0.0.0:8080 app:app
|
waitress-serve --listen=0.0.0.0:8080 app:app
|
||||||
```
|
```
|
||||||
|
@ -47,9 +34,10 @@ waitress-serve --listen=0.0.0.0:8080 app:app
|
||||||
## Building the container
|
## Building the container
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker build -t adrianux:latest .
|
docker build -t adrianux:latest - < latest.dockerfile
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Running the container
|
## Running the container
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
7
app.py
7
app.py
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from flask import Flask, render_template, redirect, url_for
|
from flask import Flask, render_template, redirect, url_for
|
||||||
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
import requests
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
@ -15,12 +18,10 @@ def about():
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def homepage():
|
def homepage():
|
||||||
return render_template("homepage.j2")
|
return render_template("homepage.j2", MONITORING_URL = os.environ['MONITORING_URL'], GIT_URL = os.environ['GIT_URL'])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
GIT_URL = os.environ['GIT_URL']
|
|
||||||
MONITORING_URL = os.environ['MONITORING_URL']
|
|
||||||
app.run(debug=os.environ['DEBUG_MODE'])
|
app.run(debug=os.environ['DEBUG_MODE'])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
dockerfile: "Dockerfile"
|
dockerfile: "Dockerfile"
|
||||||
container_name: "adrianux"
|
container_name: "adrianux"
|
||||||
image: "adrianux:latest"
|
image: "adrianux:latest"
|
||||||
env_file: .env
|
environment:
|
||||||
|
- "GIT_URL=http://git.adrianux.net"
|
||||||
|
- "MONITORING_URL=http://adrianux.net"
|
||||||
|
- "DEBUG_MODE=False"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8080:8080"
|
- "127.0.0.1:8080:8080"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<p>Languages: German, English</p>
|
<p>Languages: German, English</p>
|
||||||
<p>Programming languages: Python, Bash, POSIX Shell, Powershell</p>
|
<p>Programming languages: Python, Bash, POSIX Shell, Powershell</p>
|
||||||
<p>Markup languages: HTML, MD</p>
|
<p>Markup languages: HTML, MD</p>
|
||||||
<p>Structure languages: JSON, XML, YAML, TOML, Jinja2</p>
|
<p>Structure languages: JSON, XML, YAML, TOML, Jinja</p>
|
||||||
<p>Query languages: SQL(MariaDB, SQLite3)</p>
|
<p>Query languages: SQL(MariaDB, SQLite3)</p>
|
||||||
<p>Services managed: SSH, DNS, DHCP, AD, PF, UFW, NF-Tables,
|
<p>Services managed: SSH, DNS, DHCP, AD, PF, UFW, NF-Tables,
|
||||||
RDP(XRDP, Microsoft RDP), Webserver(Apache24, Nginx, OpenBSD-httpd,
|
RDP(XRDP, Microsoft RDP), Webserver(Apache24, Nginx, OpenBSD-httpd,
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<li><a href="/">Homepage</a></li>
|
<li><a href="/">Homepage</a></li>
|
||||||
<li><a href="imprint">Imprint</a></li>
|
<li><a href="imprint">Imprint</a></li>
|
||||||
<li><a href="about">About</a></li>
|
<li><a href="about">About</a></li>
|
||||||
<li><a href="https://cloud.adrianux.net">Monitoring</a></li>
|
<li><a href="{{ MONITORING_URL }}">Monitoring</a></li>
|
||||||
<li><a href="https://git.adrianux.net">Git</a></li>
|
<li><a href="{{ GIT_URL }}">Git</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue