Skip to content

Commit 5ed11c5

Browse files
authored
Merge pull request #13 from SakaDream/update-dependencies
Update dependencies
2 parents 5c5b000 + 78adb8a commit 5ed11c5

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ serde_derive = "1.0.104"
1717
serde_json = "1.0.48"
1818
dotenv = "0.15.0"
1919
futures = "0.3.4"
20-
failure = "0.1.6"
20+
failure = "0.1.7"
2121
derive_more = "0.99.3"
2222
jsonwebtoken = "7.1.0"
23-
bcrypt = "0.6.1"
23+
bcrypt = "0.6.2"
2424

2525
[dependencies.diesel]
2626
version = "1.4.3"
2727
features = ["postgres", "r2d2", "chrono"]
2828

2929
[dependencies.chrono]
30-
version = "0.4.10"
30+
version = "0.4.11"
3131
features = ["serde"]
3232

3333
[dependencies.uuid]

Dockerfile

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
11
# build stage
2-
FROM rustlang/rust:nightly-slim as build
2+
FROM rust:slim as build
33

4-
# install libpq
5-
RUN apt-get update
6-
RUN apt-get install -y libpq-dev
7-
RUN rm -rf /var/lib/apt/lists/*
8-
9-
# create new empty binary project
10-
RUN USER=root cargo new --bin app
4+
# install libpq and create new empty binary project
5+
RUN apt-get update; \
6+
apt-get install --no-install-recommends -y libpq-dev; \
7+
rm -rf /var/lib/apt/lists/*; \
8+
USER=root cargo new --bin app
119
WORKDIR /app
1210

1311
# copy manifests
1412
COPY ./Cargo.toml ./Cargo.toml
1513

1614
# build this project to cache dependencies
17-
RUN cargo build --release
18-
RUN rm src/*.rs
15+
RUN cargo build --release; \
16+
rm src/*.rs
1917

2018
# copy project source and necessary files
2119
COPY ./src ./src
2220
COPY ./migrations ./migrations
2321
COPY ./diesel.toml .
2422

2523
# add .env and secret.key for Docker env
26-
RUN touch .env
27-
RUN mv src/secret.key.sample src/secret.key
24+
RUN touch .env; \
25+
mv src/secret.key.sample src/secret.key
2826

2927
# rebuild app with project source
30-
RUN rm ./target/release/deps/actix_web_rest_api_with_jwt*
31-
RUN cargo build --release
28+
RUN rm ./target/release/deps/actix_web_rest_api_with_jwt*; \
29+
cargo build --release
3230

3331
# deploy stage
34-
FROM debian:stretch-slim
32+
FROM debian:buster-slim
3533

3634
# create app directory
3735
RUN mkdir app
3836
WORKDIR /app
3937

4038
# install libpq
41-
RUN apt-get update
42-
RUN apt-get install -y libpq-dev
43-
RUN rm -rf /var/lib/apt/lists/*
39+
RUN apt-get update; \
40+
apt-get install --no-install-recommends -y libpq-dev; \
41+
rm -rf /var/lib/apt/lists/*
4442

4543
# copy binary and configuration files
4644
COPY --from=build /app/target/release/actix-web-rest-api-with-jwt .

src/middleware/authen_middleware.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ where
6363
authenticate_pass = true;
6464
} else {
6565
for ignore_route in constants::IGNORE_ROUTES.iter() {
66-
debug!("route:{}",ignore_route);
6766
if req.path().starts_with(ignore_route) {
6867
authenticate_pass = true;
6968
}

0 commit comments

Comments
 (0)