Compare commits
4 Commits
1ab01ac492
...
621cd34508
Author | SHA1 | Date | |
---|---|---|---|
621cd34508 | |||
93194f4a1c | |||
20fd599ed7 | |||
1211e730e9 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
files/
|
files/
|
||||||
abyss
|
abyss
|
||||||
.env
|
.env
|
||||||
|
dev/
|
||||||
|
10
README.md
10
README.md
@ -10,6 +10,7 @@ note: this is a project made for learning purposes, you should use other more ma
|
|||||||
- [installing with docker](#docker)
|
- [installing with docker](#docker)
|
||||||
- [installing manually](#manual)
|
- [installing manually](#manual)
|
||||||
- [uploading files](#uploading)
|
- [uploading files](#uploading)
|
||||||
|
- [home page](#homepage)
|
||||||
- [docs](#docs)
|
- [docs](#docs)
|
||||||
- [todo list](#todo)
|
- [todo list](#todo)
|
||||||
|
|
||||||
@ -40,9 +41,15 @@ docker compose up -d # might be docker-compose depending on distro
|
|||||||
- then, simply upload your files with curl:
|
- then, simply upload your files with curl:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -F "file=@/path/to/file" -H "X-Auth: "$(cat /path/to/.key) http://localhost:8999/
|
curl -F "file=@/path/to/file" -H "X-Auth: "$(cat /path/to/.key) http://localhost:3235/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## homepage
|
||||||
|
|
||||||
|
- there is an example homepage in `static/` you can edit directly, which the server will serve automatically
|
||||||
|
- if running with docker, it's also possible to override `/static` inside the container with your own page.
|
||||||
|
- it is preferred to use `dev/` for that reason, since it is git-ignored and that way makes it easier if wanting to update regularly without making changes to the tree
|
||||||
|
|
||||||
## docs
|
## docs
|
||||||
|
|
||||||
- `ABYSS_URL`: this is used for the correct formatting of the response of `curl`.
|
- `ABYSS_URL`: this is used for the correct formatting of the response of `curl`.
|
||||||
@ -59,4 +66,5 @@ curl -F "file=@/path/to/file" -H "X-Auth: "$(cat /path/to/.key) http://localhost
|
|||||||
- [x] add file browser (like file://)
|
- [x] add file browser (like file://)
|
||||||
- [x] add file extension in its name
|
- [x] add file extension in its name
|
||||||
- [x] login prompt when accessing /tree
|
- [x] login prompt when accessing /tree
|
||||||
|
- [x] home page
|
||||||
- [ ] add rate limits
|
- [ ] add rate limits
|
||||||
|
@ -4,7 +4,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3235:3235"
|
- "3235:3235"
|
||||||
volumes:
|
volumes:
|
||||||
- ./files:/app/files
|
- ./files:/files
|
||||||
restart: unless-stopped
|
- ./dev:/static:ro
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
restart: unless-stopped
|
||||||
|
19
static/index.html
Normal file
19
static/index.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="description" content="Abyss - A minimalist pastebin webserver" />
|
||||||
|
<title>abyss paste</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>abyss paste</h1>
|
||||||
|
<a href="/last">
|
||||||
|
<button>last uploaded file</button>
|
||||||
|
</a>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
31
static/style.css
Normal file
31
static/style.css
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background-color: #1d1f21;
|
||||||
|
color: #c5c6c7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 0.75rem 2rem;
|
||||||
|
background-color: #66fcf1;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #1f2833;
|
||||||
|
font-size: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #45a29e;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user