Compare commits
No commits in common. "d82d801db847b76d054f17dec60e2ad021f24b03" and "f43d6232b7bda28afbaefbfaad42e56ca8980efb" have entirely different histories.
d82d801db8
...
f43d6232b7
24 changed files with 27 additions and 9 deletions
|
@ -5,4 +5,3 @@ Dockerfile
|
||||||
Jenkinsfile
|
Jenkinsfile
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
paste*
|
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
.venv*
|
.venv*
|
||||||
.env
|
.env
|
||||||
__pycache__
|
__pycache__
|
||||||
paste*
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ FROM alpine:latest
|
||||||
WORKDIR /opt/
|
WORKDIR /opt/
|
||||||
|
|
||||||
ENV DEBUG_MODE=False
|
ENV DEBUG_MODE=False
|
||||||
ENV PASTE_DIR=/opt/pastes
|
ENV PASTE_DIR=pastes
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN apk add --no-cache python3 py3-flask py3-waitress
|
RUN apk add --no-cache python3 py3-flask py3-waitress cron
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,12 @@ waitress-serve --listen=0.0.0.0:8080 app:app
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
|
## Building the container
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker build -t adrianux:latest .
|
||||||
|
```
|
||||||
|
|
||||||
## Running the container
|
## Running the container
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
2
app.py
2
app.py
|
@ -28,7 +28,7 @@ def bin():
|
||||||
def view_paste(paste_id):
|
def view_paste(paste_id):
|
||||||
file_path = os.path.join(paste_dir, paste_id)
|
file_path = os.path.join(paste_dir, paste_id)
|
||||||
if not os.path.exists(file_path):
|
if not os.path.exists(file_path):
|
||||||
return redirect("/", code=302)
|
return redirect("http://localhost:5000", code=302)
|
||||||
|
|
||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
1
paste/1129250e41fd939f
Normal file
1
paste/1129250e41fd939f
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/166df7446b9cedd2
Normal file
1
paste/166df7446b9cedd2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/223d486abe15baac
Normal file
1
paste/223d486abe15baac
Normal file
|
@ -0,0 +1 @@
|
||||||
|
basr
|
1
paste/5c7060da2fde6c70
Normal file
1
paste/5c7060da2fde6c70
Normal file
|
@ -0,0 +1 @@
|
||||||
|
t
|
1
paste/5f061281b5db5798
Normal file
1
paste/5f061281b5db5798
Normal file
|
@ -0,0 +1 @@
|
||||||
|
VW Polo 9n3 1.2
|
1
paste/68acc064f8c810fa
Normal file
1
paste/68acc064f8c810fa
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/700d33e6844602f6
Normal file
1
paste/700d33e6844602f6
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/75f8d4eae450a00d
Normal file
1
paste/75f8d4eae450a00d
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test1
|
1
paste/793e612cd9ebf718
Normal file
1
paste/793e612cd9ebf718
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tset
|
1
paste/7b8940f86990f32e
Normal file
1
paste/7b8940f86990f32e
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tset
|
1
paste/915916ffb2addda0
Normal file
1
paste/915916ffb2addda0
Normal file
|
@ -0,0 +1 @@
|
||||||
|
t
|
1
paste/95b2820464994fa2
Normal file
1
paste/95b2820464994fa2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/9eb5c03c1be2404c
Normal file
1
paste/9eb5c03c1be2404c
Normal file
|
@ -0,0 +1 @@
|
||||||
|
doo
|
1
paste/c34c7220f89764e8
Normal file
1
paste/c34c7220f89764e8
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/c64b23a68d8484ea
Normal file
1
paste/c64b23a68d8484ea
Normal file
|
@ -0,0 +1 @@
|
||||||
|
test
|
1
paste/c78e7f7161a150c0
Normal file
1
paste/c78e7f7161a150c0
Normal file
|
@ -0,0 +1 @@
|
||||||
|
basr
|
1
paste/ebd8f44366c8c692
Normal file
1
paste/ebd8f44366c8c692
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tset
|
1
paste/test
Normal file
1
paste/test
Normal file
|
@ -0,0 +1 @@
|
||||||
|
</h1>test</h1>
|
|
@ -14,9 +14,5 @@
|
||||||
<h1>{{ self.title() }}</h1>
|
<h1>{{ self.title() }}</h1>
|
||||||
<article>{% block content %}{% endblock %}</article>
|
<article>{% block content %}{% endblock %}</article>
|
||||||
</main>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue