Build from Dockerfile to improve caching #18

Open
cameron wants to merge 6 commits from feature/improve-build-time into master
3 changed files with 8 additions and 4 deletions
Showing only changes of commit 6e39f8c58e - Show all commits

4
Dockerfile.ci Normal file
View File

@@ -0,0 +1,4 @@
FROM rust:1.55
COPY Cargo.toml .
RUN cargo fetch
COPY src/ ./src/

6
Jenkinsfile vendored
View File

@@ -1,8 +1,8 @@
pipeline {
agent {
docker {
image 'rust:1.55'
args '-v "$PWD":/usr/src/image-api'
dockerfile {
filename 'Dockerfile.ci'
args '-v "$PWD:/usr/src/image-api'
}
}

View File

@@ -36,7 +36,7 @@ pub async fn login(
if let Some(user) = user_dao.get_user(&creds.username, &creds.password) {
let claims = Claims {
sub: user.id.to_string(),
exp: (Utc::now() + Duration::days(5)).timestamp(),
exp: (Utc::now() + Duration::minutes(1)).timestamp(),
};
let token = encode(
&Header::default(),