adrianux #1
24 changed files with 9 additions and 27 deletions
|
@ -5,3 +5,4 @@ Dockerfile
|
||||||
Jenkinsfile
|
Jenkinsfile
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
|
paste*
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.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=pastes
|
ENV PASTE_DIR=/opt/pastes
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN apk add --no-cache python3 py3-flask py3-waitress cron
|
RUN apk add --no-cache python3 py3-flask py3-waitress
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
|
@ -45,12 +45,6 @@ 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("http://localhost:5000", code=302)
|
return redirect("/", code=302)
|
||||||
|
|
||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
content = f.read()
|
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>
|
<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