Merge pull request 'adrianux' (#1) from adrianux into master

Reviewed-on: #1
This commit is contained in:
ahoemann 2025-03-28 10:44:22 +01:00
commit d82d801db8
24 changed files with 9 additions and 27 deletions

View file

@ -5,3 +5,4 @@ Dockerfile
Jenkinsfile
LICENSE
README.md
paste*

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.venv*
.env
__pycache__
paste*

View file

@ -2,11 +2,11 @@ FROM alpine:latest
WORKDIR /opt/
ENV DEBUG_MODE=False
ENV PASTE_DIR=pastes
ENV PASTE_DIR=/opt/pastes
COPY . .
RUN apk add --no-cache python3 py3-flask py3-waitress cron
RUN apk add --no-cache python3 py3-flask py3-waitress
EXPOSE 8080

View file

@ -45,12 +45,6 @@ waitress-serve --listen=0.0.0.0:8080 app:app
# Docker
## Building the container
```sh
docker build -t adrianux:latest .
```
## Running the container
```sh

2
app.py
View file

@ -28,7 +28,7 @@ def bin():
def view_paste(paste_id):
file_path = os.path.join(paste_dir, paste_id)
if not os.path.exists(file_path):
return redirect("http://localhost:5000", code=302)
return redirect("/", code=302)
with open(file_path, 'r') as f:
content = f.read()

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
basr

View file

@ -1 +0,0 @@
t

View file

@ -1 +0,0 @@
VW Polo 9n3 1.2

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
test1

View file

@ -1 +0,0 @@
tset

View file

@ -1 +0,0 @@
tset

View file

@ -1 +0,0 @@
t

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
doo

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
test

View file

@ -1 +0,0 @@
basr

View file

@ -1 +0,0 @@
tset

View file

@ -1 +0,0 @@
</h1>test</h1>

View file

@ -14,5 +14,9 @@
<h1>{{ self.title() }}</h1>
<article>{% block content %}{% endblock %}</article>
</main>
<footer class="container">
<p><a href="mailto:ahoemann@proton.me">ahoemann@proton.me</a>
</p>Authored by <a href="https://adrianux.net/">Adrian Hoemann</a>.
</footer>
</body>
</html>