diff --git a/README.md b/README.md index 7cf7903..d8bec04 100644 --- a/README.md +++ b/README.md @@ -3,41 +3,28 @@ ## Setting up the environment 1. Create a virtual environment: - ```sh python3 -m venv .venv ``` 2. Activate the virtual environment: - ```sh . .venv/bin/activate ``` 3. Install dependencies: - ```sh pip install requirements.txt ``` 4. Set the environment variables: - ```sh +export GIT_URL=http://git.adrianux.net +export WEBSITE_URL=http://adrianux.net 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: - ```sh 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 ```sh -docker build -t adrianux:latest . +docker build -t adrianux:latest - < latest.dockerfile ``` + ## Running the container ```sh diff --git a/app.py b/app.py index 5837049..bd477a3 100755 --- a/app.py +++ b/app.py @@ -1,6 +1,9 @@ #!/usr/bin/env python3 from flask import Flask, render_template, redirect, url_for +from concurrent.futures import ThreadPoolExecutor +import requests import os +import time app = Flask(__name__) @@ -15,12 +18,10 @@ def about(): @app.route("/") 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__": - GIT_URL = os.environ['GIT_URL'] - MONITORING_URL = os.environ['MONITORING_URL'] app.run(debug=os.environ['DEBUG_MODE']) diff --git a/docker-compose.yml b/docker-compose.yml index 9241790..01e34a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,9 @@ dockerfile: "Dockerfile" container_name: "adrianux" image: "adrianux:latest" - env_file: .env + environment: + - "GIT_URL=http://git.adrianux.net" + - "MONITORING_URL=http://adrianux.net" + - "DEBUG_MODE=False" ports: - "127.0.0.1:8080:8080" diff --git a/templates/about.j2 b/templates/about.j2 index 16e4c30..0da40b0 100644 --- a/templates/about.j2 +++ b/templates/about.j2 @@ -10,7 +10,7 @@

Languages: German, English

Programming languages: Python, Bash, POSIX Shell, Powershell

Markup languages: HTML, MD

-

Structure languages: JSON, XML, YAML, TOML, Jinja2

+

Structure languages: JSON, XML, YAML, TOML, Jinja

Query languages: SQL(MariaDB, SQLite3)

Services managed: SSH, DNS, DHCP, AD, PF, UFW, NF-Tables, RDP(XRDP, Microsoft RDP), Webserver(Apache24, Nginx, OpenBSD-httpd, diff --git a/templates/base.j2 b/templates/base.j2 index a043f1b..2ac8dd6 100644 --- a/templates/base.j2 +++ b/templates/base.j2 @@ -14,8 +14,8 @@

  • Homepage
  • Imprint
  • About
  • -
  • Monitoring
  • -
  • Git
  • +
  • Monitoring
  • +
  • Git