DOCKER
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -1,21 +1,21 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# Arbeitsverzeichnis
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Git installieren
|
# Systemabhängigkeiten (optional, falls gebraucht)
|
||||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
libpq-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Repository klonen
|
# Requirements installieren
|
||||||
ARG REPO_URL
|
COPY requirements.txt .
|
||||||
RUN git clone ${REPO_URL} /app
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Abhängigkeiten installieren (falls requirements.txt existiert)
|
# Code kopieren
|
||||||
RUN pip install --no-cache-dir -r requirements.txt || true
|
COPY . .
|
||||||
|
|
||||||
# Entrypoint-Skript für git pull beim Start
|
ENV FLASK_APP=app.py
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
ENV FLASK_ENV=development
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
|
|
||||||
EXPOSE 5000
|
CMD ["flask", "run", "--host=0.0.0.0"]
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
flask
|
||||||
|
psycopg2-binary
|
||||||
BIN
static/HURENSOHN.ico
Normal file
BIN
static/HURENSOHN.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 187 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
body {
|
||||||
|
font-family: "Comic Sans MS" !important;
|
||||||
|
}
|
||||||
@@ -1,19 +1,20 @@
|
|||||||
<html lang="de">
|
<html lang="de"'>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="/css/style.css">
|
<meta charstet="utf-8"><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||||
<meta charstet="utf-8">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="/static/HURENSOHN.ico">
|
||||||
|
|
||||||
<title> {% block title %} {% endblock %} </title>
|
<title> {% block title %} {% endblock %} </title>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1> Herzlich Willkommen auf der Website der BI23b! </h1>
|
<h1>{% block huso %} {% endblock %}</h1>
|
||||||
<p> Zurücklehnen und genießen... </p>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||||
</html>
|
</html>
|
||||||
@@ -2,4 +2,7 @@
|
|||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
HURENSOHN
|
HURENSOHN
|
||||||
|
{% endblock %}
|
||||||
|
{% block huso %}
|
||||||
|
HURENSOHN
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user