Adjust dockerfiles, fix cargo.toml and remove unused deps

This commit is contained in:
Felix Ableitner 2020-09-24 12:53:02 +02:00
parent bca55ff775
commit 3870208879
9 changed files with 25 additions and 35 deletions

16
Cargo.lock generated
View file

@ -1926,26 +1926,16 @@ version = "0.0.1"
dependencies = [ dependencies = [
"actix", "actix",
"actix-files", "actix-files",
"actix-rt",
"actix-web", "actix-web",
"actix-web-actors", "actix-web-actors",
"anyhow", "anyhow",
"async-trait",
"awc", "awc",
"background-jobs",
"base64 0.12.3",
"bcrypt",
"captcha",
"cargo-husky", "cargo-husky",
"chrono", "chrono",
"diesel", "diesel",
"diesel_migrations", "diesel_migrations",
"env_logger", "env_logger",
"futures",
"http",
"http-signature-normalization-actix", "http-signature-normalization-actix",
"itertools",
"jsonwebtoken",
"lazy_static", "lazy_static",
"lemmy_api", "lemmy_api",
"lemmy_apub", "lemmy_apub",
@ -1956,19 +1946,13 @@ dependencies = [
"lemmy_websocket", "lemmy_websocket",
"log", "log",
"openssl", "openssl",
"percent-encoding",
"rand 0.7.3",
"reqwest", "reqwest",
"rss", "rss",
"serde 1.0.116", "serde 1.0.116",
"serde_json",
"sha2", "sha2",
"strum", "strum",
"strum_macros",
"thiserror",
"tokio", "tokio",
"url", "url",
"uuid 0.8.1",
] ]
[[package]] [[package]]

View file

@ -27,40 +27,24 @@ lemmy_rate_limit = { path = "./lemmy_rate_limit" }
lemmy_websocket = { path = "./lemmy_websocket" } lemmy_websocket = { path = "./lemmy_websocket" }
diesel = "1.4" diesel = "1.4"
diesel_migrations = "1.4" diesel_migrations = "1.4"
bcrypt = "0.8"
chrono = { version = "0.4", features = ["serde"] } chrono = { version = "0.4", features = ["serde"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
actix = "0.10" actix = "0.10"
actix-web = { version = "3.0", default-features = false, features = ["rustls"] } actix-web = { version = "3.0", default-features = false, features = ["rustls"] }
actix-files = { version = "0.3", default-features = false } actix-files = { version = "0.3", default-features = false }
actix-web-actors = { version = "3.0", default-features = false } actix-web-actors = { version = "3.0", default-features = false }
actix-rt = { version = "1.1", default-features = false }
awc = { version = "2.0", default-features = false } awc = { version = "2.0", default-features = false }
log = "0.4" log = "0.4"
env_logger = "0.7" env_logger = "0.7"
rand = "0.7"
strum = "0.19" strum = "0.19"
strum_macros = "0.19"
jsonwebtoken = "7.0"
lazy_static = "1.3" lazy_static = "1.3"
rss = "1.9" rss = "1.9"
url = { version = "2.1", features = ["serde"] } url = { version = "2.1", features = ["serde"] }
percent-encoding = "2.1"
openssl = "0.10" openssl = "0.10"
http = "0.2"
http-signature-normalization-actix = { version = "0.4", default-features = false, features = ["sha-2"] } http-signature-normalization-actix = { version = "0.4", default-features = false, features = ["sha-2"] }
base64 = "0.12"
tokio = "0.2" tokio = "0.2"
futures = "0.3"
itertools = "0.9"
uuid = { version = "0.8", features = ["serde", "v4"] }
sha2 = "0.9" sha2 = "0.9"
async-trait = "0.1"
captcha = "0.0"
anyhow = "1.0" anyhow = "1.0"
thiserror = "1.0"
background-jobs = " 0.8"
reqwest = { version = "0.10", features = ["json"] } reqwest = { version = "0.10", features = ["json"] }
[dev-dependencies.cargo-husky] [dev-dependencies.cargo-husky]

View file

@ -12,6 +12,9 @@ RUN mkdir -p lemmy_db/src/ \
lemmy_utils/src/ \ lemmy_utils/src/ \
lemmy_structs/src/ \ lemmy_structs/src/ \
lemmy_rate_limit/src/ \ lemmy_rate_limit/src/ \
lemmy_api/src/ \
lemmy_apub/src/ \
lemmy_websocket/src/ \
lemmy lemmy
# Copy the cargo tomls # Copy the cargo tomls
@ -20,6 +23,9 @@ COPY lemmy_db/Cargo.toml ./lemmy_db/
COPY lemmy_utils/Cargo.toml ./lemmy_utils/ COPY lemmy_utils/Cargo.toml ./lemmy_utils/
COPY lemmy_structs/Cargo.toml ./lemmy_structs/ COPY lemmy_structs/Cargo.toml ./lemmy_structs/
COPY lemmy_rate_limit/Cargo.toml ./lemmy_rate_limit/ COPY lemmy_rate_limit/Cargo.toml ./lemmy_rate_limit/
COPY lemmy_api/Cargo.toml ./lemmy_api/
COPY lemmy_apub/Cargo.toml ./lemmy_apub/
COPY lemmy_websocket/Cargo.toml ./lemmy_websocket/
# Cache the deps # Cache the deps
RUN cargo build-deps RUN cargo build-deps
@ -30,6 +36,9 @@ COPY lemmy_db/src ./lemmy_db/src/
COPY lemmy_utils/src/ ./lemmy_utils/src/ COPY lemmy_utils/src/ ./lemmy_utils/src/
COPY lemmy_structs/src/ ./lemmy_structs/src/ COPY lemmy_structs/src/ ./lemmy_structs/src/
COPY lemmy_rate_limit/src/ ./lemmy_rate_limit/src/ COPY lemmy_rate_limit/src/ ./lemmy_rate_limit/src/
COPY lemmy_api/src/ ./lemmy_api/src/
COPY lemmy_apub/src/ ./lemmy_apub/src/
COPY lemmy_websocket/src/ ./lemmy_websocket/src/
COPY migrations ./migrations/ COPY migrations ./migrations/
# Build for debug # Build for debug

View file

@ -15,6 +15,9 @@ COPY lemmy_db ./lemmy_db
COPY lemmy_utils ./lemmy_utils COPY lemmy_utils ./lemmy_utils
COPY lemmy_structs ./lemmy_structs COPY lemmy_structs ./lemmy_structs
COPY lemmy_rate_limit ./lemmy_rate_limit COPY lemmy_rate_limit ./lemmy_rate_limit
COPY lemmy_api ./lemmy_api
COPY lemmy_apub ./lemmy_apub
COPY lemmy_websocket ./lemmy_websocket
RUN mkdir -p ./src/bin \ RUN mkdir -p ./src/bin \
&& echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs && echo 'fn main() { println!("Dummy") }' > ./src/bin/main.rs
RUN cargo build --release RUN cargo build --release

View file

@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Felix Ableitner <me@nutomic.com>"] authors = ["Felix Ableitner <me@nutomic.com>"]
edition = "2018" edition = "2018"
[lib]
name = "lemmy_api"
path = "src/lib.rs"
[dependencies] [dependencies]
lemmy_apub = { path = "../lemmy_apub" } lemmy_apub = { path = "../lemmy_apub" }
lemmy_utils = { path = "../lemmy_utils" } lemmy_utils = { path = "../lemmy_utils" }

View file

@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Felix Ableitner <me@nutomic.com>"] authors = ["Felix Ableitner <me@nutomic.com>"]
edition = "2018" edition = "2018"
[lib]
name = "lemmy_apub"
path = "src/lib.rs"
[dependencies] [dependencies]
lemmy_utils = { path = "../lemmy_utils" } lemmy_utils = { path = "../lemmy_utils" }
lemmy_db = { path = "../lemmy_db" } lemmy_db = { path = "../lemmy_db" }

View file

@ -7,8 +7,6 @@ edition = "2018"
name = "lemmy_utils" name = "lemmy_utils"
path = "src/lib.rs" path = "src/lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
regex = "1.3" regex = "1.3"
config = { version = "0.10", default-features = false, features = ["hjson"] } config = { version = "0.10", default-features = false, features = ["hjson"] }

View file

@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Felix Ableitner <me@nutomic.com>"] authors = ["Felix Ableitner <me@nutomic.com>"]
edition = "2018" edition = "2018"
[lib]
name = "lemmy_websocket"
path = "src/lib.rs"
[dependencies] [dependencies]
lemmy_utils = { path = "../lemmy_utils" } lemmy_utils = { path = "../lemmy_utils" }
lemmy_structs = { path = "../lemmy_structs" } lemmy_structs = { path = "../lemmy_structs" }

View file

@ -1,4 +1,4 @@
#![recursion_limit = "512"] #![recursion_limit = "512"]
pub mod code_migrations; pub mod code_migrations;
pub mod routes; pub mod routes;