Compare commits
5 commits
f43d6232b7
...
d82d801db8
Author | SHA1 | Date | |
---|---|---|---|
d82d801db8 | |||
08a1551142 | |||
49a10e95a2 | |||
2f7d0f70e5 | |||
9dd416f8ab |
24 changed files with 9 additions and 27 deletions
|
@ -5,3 +5,4 @@ Dockerfile
|
|||
Jenkinsfile
|
||||
LICENSE
|
||||
README.md
|
||||
paste*
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.venv*
|
||||
.env
|
||||
__pycache__
|
||||
paste*
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
2
app.py
|
@ -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()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
basr
|
|
@ -1 +0,0 @@
|
|||
t
|
|
@ -1 +0,0 @@
|
|||
VW Polo 9n3 1.2
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
test1
|
|
@ -1 +0,0 @@
|
|||
tset
|
|
@ -1 +0,0 @@
|
|||
tset
|
|
@ -1 +0,0 @@
|
|||
t
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
doo
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
test
|
|
@ -1 +0,0 @@
|
|||
basr
|
|
@ -1 +0,0 @@
|
|||
tset
|
|
@ -1 +0,0 @@
|
|||
</h1>test</h1>
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue