Skip to content

Commit

Permalink
ci: adding dockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
arunavabasucom committed Feb 10, 2024
1 parent 63cf5bc commit 0e9fc94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/backend_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Build and push Docker image
run: |
cd backend && docker build -t $CONTAINER_NAME:${{ github.sha }} -t $CONTAINER_NAME:latest .
docker build -t $CONTAINER_NAME:${{ github.sha }} -t $CONTAINER_NAME:latest .
docker push $CONTAINER_NAME:${{ github.sha }}
Expand Down
17 changes: 17 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# creating a base env
FROM python:3.10.13-slim

# creating a workspace
WORKDIR /app

# copy the workspace directory
COPY . /app

# install dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt

# expose PORT 8080
EXPOSE 8080

# run this on start
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080"]

0 comments on commit 0e9fc94

Please sign in to comment.