Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python
WORKDIR /fast-api
COPY ./requirments.txt/fast-api/
RUN pip install --no-cache-dir --upgrade -r /fast-api/requirements.txt
COPY . /fast-api
RUN mkdir -p /fast-api/data
CMD ["uvicorn","app.main:app", "--host", "0.0.0.0","--port","8000"]
16 changes: 16 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pipeline {
agent any
stages{
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
sh 'docker compose up --build -d --no-cache'
}
}
}
}

9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.8'
services:
fast_api:
build:
ports:
- '8000:8000'
command: uvicorn app.main:app --host 0.0.0.0 --port 8000