Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Containerized App With Docker (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelDobariya38 authored Jan 12, 2024
2 parents e75987f + cd233b5 commit 2c2dff5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.flake8
*.gitignore
*.dockerignore
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.12-alpine

WORKDIR /app

COPY ./requirements.txt /app
RUN pip install -r requirements.txt

COPY . /app

# IF you wan run api then follow the steps.
# 1. go and change the configurion under smart_manager.json >> settings >> api == true
# 2. go and edit smart_manager.json >> settings >> api-server-config >> host == "0.0.0.0"
# 3. uncomment the below code (to expose the port 8000) and then build the image
# ```
# EXPOSE 8000
# ```
# 4. then run the image as container by typing the following command in your terminal
# docker run -p 8000:8000 [image-name:tag]
# Note: change the [image-name:tag] with actual value.s
# 5. then go to your localhost:8000 for asseccing the api untill the container is running.

CMD ["python", "SmartManager/main.py"]

0 comments on commit 2c2dff5

Please sign in to comment.