Set up docker stuff

main
Ashelyn Dawn 2 years ago
parent 213a4a8a99
commit ff099c66ec

@ -0,0 +1,3 @@
/target
/uploads
/data

@ -0,0 +1,10 @@
build:
stage: build
only:
- master
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG

122
Cargo.lock generated

@ -2,17 +2,6 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "ahash"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
"getrandom",
"once_cell",
"version_check",
]
[[package]]
name = "ansi_term"
version = "0.12.1"
@ -249,18 +238,6 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "fallible-iterator"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
[[package]]
name = "fallible-streaming-iterator"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "figment"
version = "0.10.6"
@ -449,18 +426,6 @@ name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
dependencies = [
"ahash",
]
[[package]]
name = "hashlink"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"
dependencies = [
"hashbrown",
]
[[package]]
name = "hermit-abi"
@ -579,16 +544,6 @@ version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
[[package]]
name = "libsqlite3-sys"
version = "0.22.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d"
dependencies = [
"pkg-config",
"vcpkg",
]
[[package]]
name = "lock_api"
version = "0.4.5"
@ -867,27 +822,6 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "r2d2"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f"
dependencies = [
"log",
"parking_lot",
"scheduled-thread-pool",
]
[[package]]
name = "r2d2_sqlite"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d24607049214c5e42d3df53ac1d8a23c34cc6a5eefe3122acb2c72174719959"
dependencies = [
"r2d2",
"rusqlite",
]
[[package]]
name = "rand"
version = "0.8.4"
@ -1084,31 +1018,6 @@ dependencies = [
"uncased",
]
[[package]]
name = "rocket_sync_db_pools"
version = "0.1.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38cfdfebd552d075c368e641c88a5cd6ce1c58c5c710548aeb777abb48830f4b"
dependencies = [
"r2d2",
"r2d2_sqlite",
"rocket",
"rocket_sync_db_pools_codegen",
"rusqlite",
"serde",
"tokio",
]
[[package]]
name = "rocket_sync_db_pools_codegen"
version = "0.1.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267808c094db5366e1d8925aaf9f2ce05ff9b3bd92cb18c7040a1fe219c2e25"
dependencies = [
"devise",
"quote",
]
[[package]]
name = "rpassword"
version = "5.0.1"
@ -1119,21 +1028,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "rusqlite"
version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152"
dependencies = [
"bitflags",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"memchr",
"smallvec",
]
[[package]]
name = "rustc_version"
version = "0.2.3"
@ -1155,15 +1049,6 @@ version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
[[package]]
name = "scheduled-thread-pool"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7"
dependencies = [
"parking_lot",
]
[[package]]
name = "scoped-tls"
version = "1.0.0"
@ -1370,7 +1255,6 @@ dependencies = [
"rand",
"rexiv2",
"rocket",
"rocket_sync_db_pools",
"rpassword",
"serde",
"uuid",
@ -1625,12 +1509,6 @@ dependencies = [
"serde",
]
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
version = "0.9.3"

@ -14,8 +14,3 @@ uuid = {version = "0.8.2", features = ["v4", "serde"] }
chrono = "0.4.19"
bcrypt = "0.10.1"
rpassword = "5.0.1"
[dependencies.rocket_sync_db_pools]
version = "0.1.0-rc.1"
default-features = false
features = ["sqlite_pool"]

@ -0,0 +1,20 @@
from rust:1.57.0
env ROCKET_ADDRESS=0.0.0.0
env ROCKET_PORT=3000
run cd /tmp && USER=root cargo new --bin app
workdir /tmp/app
run apt-get update
run apt install -y libgexiv2-dev
run rustup default stable
run cargo install cargo-build-deps
copy Cargo.toml Cargo.lock ./
run cargo build-deps --release
copy . .
run cargo build --release
cmd cargo run --release

@ -27,6 +27,12 @@ impl<'r> FromRequest<'r> for Session {
return request::Outcome::Forward(())
}
let cookie_val = cookie.unwrap().value().parse::<SessionId>();
if cookie_val.is_err() {
return request::Outcome::Forward(())
}
let session_id = cookie.unwrap().value().parse::<SessionId>().unwrap();
let session = sessions.get_session(session_id);

@ -6,6 +6,8 @@
<body>
<h1>Tempest's Temp Files</h1>
<p>UI coming soon maybe</p>
<script>
</script>

@ -6,6 +6,8 @@
<body>
<h1>Tempest's Temp Files</h1>
<p>UI coming soon maybe</p>
<script>
</script>

Loading…
Cancel
Save