Skip to content

Commit a89af7c

Browse files
committed
Added Dockerfile
1 parent bd607b8 commit a89af7c

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Use the official Python image as the base image
2+
FROM python:3.11-slim-bookworm
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy your Django app files into the container
8+
COPY . /app/
9+
10+
# Install dependencies (if you have a requirements.txt file)
11+
RUN pip install -r requirements.txt
12+
RUN python manage.py migrate
13+
# Expose the port your Django app will run on (default is 8000)
14+
EXPOSE 8000
15+
16+
# Start your Django app
17+
CMD ["python", "manage.py", "runserver","0.0.0.0:8000" ]
18+

readme.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,31 @@ pip install -r requirements.txt
9090
python manage.py runserver
9191
```
9292

93+
94+
#### Docker
95+
1. Install Docker on your system. Refer to the official documentation for instructions: https://docs.docker.com/get-docker/
96+
97+
2. Clone the repository:
98+
99+
```bash
100+
git clone https://github.com/AfthabEK/Entry-Exit-DL.git
101+
cd Entry-Exit-DL
102+
```
103+
104+
3. Build the Docker image:
105+
106+
```bash
107+
docker build -t entry-exit-dl .
108+
```
109+
110+
4. Run the Docker container:
111+
112+
```bash
113+
docker run -d -p 8000:8000 entry-exit-dl
114+
```
115+
116+
117+
93118
## Usage
94119

95120
1. Ensure the RFID reader is connected and accessible on the same network as the server.

0 commit comments

Comments
 (0)