Skip to content

Commit

Permalink
initial commit to prod branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ash2code committed May 20, 2024
1 parent e784a18 commit ddc1da1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.9-slim
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD ["flask", "run", "--host=0.0.0.0"]
30 changes: 30 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pipeline {
agent any

environment {
IMAGE_NAME = "ash2code/library"
}

stages {
stage("code-checkout") {
steps {
git changelog: false, poll: false, url: 'https://github.com/ash2code/library-management-system.git'
}
}
stage("docker-build") {
steps {
sh "docker build -t $IMAGE_NAME:${env.BRANCH_NAME} ."
}
}
stage("images-list") {
steps {
sh "docker images -a"
}
}
stage("docker-run") {
steps {
sh "docker container run -dt -p 5000:5000 $IMAGE_NAME:${env.BRANCH_NAME}"
}
}
}
}

0 comments on commit ddc1da1

Please sign in to comment.