Compare commits
No commits in common. "3ba86697b7c36d3f4eb0219004382614788977b0" and "a2bc80d501a4212c99d7f8864fa690bee294ef05" have entirely different histories.
3ba86697b7
...
a2bc80d501
|
@ -8,7 +8,6 @@ services:
|
|||
bfile:
|
||||
volumes:
|
||||
- './filed:/opt/code'
|
||||
- './.git:/opt/code/.git:ro' # for fetching the latest commit version
|
||||
- '/opt/code/target'
|
||||
- './volatile/files:/opt/user_uploads'
|
||||
caddy:
|
||||
|
|
|
@ -32,12 +32,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
|
||||
|
||||
[[package]]
|
||||
name = "askama"
|
||||
version = "0.12.0"
|
||||
|
@ -286,7 +280,6 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"static_dir",
|
||||
"tokio",
|
||||
"warp",
|
||||
]
|
||||
|
@ -548,29 +541,6 @@ dependencies = [
|
|||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "include_dir"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24b56e147e6187d61e9d0f039f10e070d0c0a887e24fe0bb9ca3f29bfde62cab"
|
||||
dependencies = [
|
||||
"include_dir_impl",
|
||||
"proc-macro-hack",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "include_dir_impl"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a0c890c85da4bab7bce4204c707396bbd3c6c8a681716a51c8814cfc2b682df"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.9.3"
|
||||
|
@ -842,12 +812,6 @@ version = "0.2.17"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.20+deprecated"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.67"
|
||||
|
@ -1054,23 +1018,6 @@ version = "0.9.8"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
||||
|
||||
[[package]]
|
||||
name = "static_dir"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8286dc044d09abcb8bf85440b94f2c41aee322733a58cd195cf830ee660cadf5"
|
||||
dependencies = [
|
||||
"headers",
|
||||
"http",
|
||||
"hyper",
|
||||
"include_dir",
|
||||
"log",
|
||||
"mime_guess",
|
||||
"once_cell",
|
||||
"urlencoding",
|
||||
"warp",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sval"
|
||||
version = "2.9.1"
|
||||
|
@ -1360,12 +1307,6 @@ dependencies = [
|
|||
"percent-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "urlencoding"
|
||||
version = "1.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a1f0175e03a0973cf4afd476bef05c26e228520400eb1fd473ad417b1c00ffb"
|
||||
|
||||
[[package]]
|
||||
name = "utf-8"
|
||||
version = "0.7.6"
|
||||
|
|
|
@ -20,6 +20,5 @@ redis = { version = "0.23.3", features = ["tokio"] }
|
|||
serde = { version = "1.0.188", features = ["derive"] }
|
||||
serde_json = "1.0.107"
|
||||
sha2 = "0.10.8"
|
||||
static_dir = "0.2.0"
|
||||
tokio = { version = "1.32.0", features = ["rt", "macros", "rt-multi-thread"] }
|
||||
warp = "0.3.6"
|
||||
|
|
|
@ -4,8 +4,6 @@ FROM rust as builder
|
|||
WORKDIR /opt/code
|
||||
COPY . .
|
||||
|
||||
RUN apt install -y git
|
||||
|
||||
# No build is done during this step
|
||||
# since the directory will be mounted anyways
|
||||
# to the dev's machine.
|
||||
|
|
|
@ -3,11 +3,6 @@ This is a part of blek! File that is responsible for serving and uploading files
|
|||
This module is released under the GPLv3 with additions, copy of which is included in the top level of this repository.
|
||||
|
||||
## Building
|
||||
First, install the build dependencies:
|
||||
|
||||
1. Rust toolchain
|
||||
2. Git (latest version)
|
||||
|
||||
To get started with this, copy either `Dockerfile.dev` or `Dockerfile.prod` to `Dockerfile`, depending on your environment.
|
||||
|
||||
Then either build it manually or start it up using the `docker-compose.yml` file, which is provided in the top level directory.
|
||||
|
|
|
@ -70,8 +70,4 @@ impl Env {
|
|||
pub fn usercontent_dir(self: &Self) -> Box<&Path> {
|
||||
Box::new(Path::new(&self.filedir))
|
||||
}
|
||||
pub fn shortcommit(self: &Self) -> String {
|
||||
let commit = self.last_commit.to_string().clone();
|
||||
commit.chars().take(6).collect()
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
bleK! File {{ env.shortcommit() }}
|
||||
Made with Rust
|
||||
</td>
|
||||
<td>
|
||||
Released under GPLv3
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
<input type="checkbox" name="passworded">
|
||||
I want to add a password to the file:
|
||||
|
||||
<span style="font-size:80%;display:block">
|
||||
Warning: the file WILL NOT be encrypted,<br/>
|
||||
therefore this is not 100% secure.<br/>
|
||||
<span style="font-size:80%;display:block;padding:2px 0 0 24px">
|
||||
Warning: the file WILL NOT be encrypted.<br/>
|
||||
<a href="/passworded-files">
|
||||
Learn more
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue