Skip to content

Commit 6afa1cb

Browse files
Dushyant BhardwajDushyant Bhardwaj
authored andcommitted
solved uneven layout of sidebar
1 parent 925eb50 commit 6afa1cb

11 files changed

Lines changed: 333 additions & 305 deletions

File tree

.github/workflows/pr-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: '18'
19+
node-version: "18"
2020

2121
- name: Install Dependencies
2222
run: |

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ repos:
33
rev: "v0.0.241"
44
hooks:
55
- id: ruff
6-
args: [--fix]
6+
args: [--fix]
77

88
- repo: https://github.com/psf/black
9-
rev: "22.3.0"
9+
rev: "22.3.0"
1010
hooks:
1111
- id: black
12-
language_version: python3
12+
language_version: python3

backend/app/logging_config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"logger": {
3-
"path": "app/logs/PictoPy.log",
4-
"filename": "PictoPy.log",
5-
"level": "info",
6-
"rotation": "1 days",
7-
"retention": "1 months",
8-
"format": "<level>{level: <8}</level> <green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> request id: {extra[request_id]} - <cyan>{name}</cyan>:<cyan>{function}</cyan> - <level>{message}</level>"
9-
}
10-
}
2+
"logger": {
3+
"path": "app/logs/PictoPy.log",
4+
"filename": "PictoPy.log",
5+
"level": "info",
6+
"rotation": "1 days",
7+
"retention": "1 months",
8+
"format": "<level>{level: <8}</level> <green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> request id: {extra[request_id]} - <cyan>{name}</cyan>:<cyan>{function}</cyan> - <level>{message}</level>"
9+
}
10+
}

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ services:
3232
volumes:
3333
frontend-data:
3434
images-data:
35-

docs/backend/docker-setup.md

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
1-
# Backend Docker Setup for PictoPy
2-
3-
This guide provides step-by-step instructions for building and running the PictoPy backend using Docker.
4-
5-
## Table of Contents
6-
7-
1. [Prerequisites](#prerequisites)
8-
2. [Building the Docker Image](#building-the-docker-image)
9-
3. [Running the Docker Container](#running-the-docker-container)
10-
4. [Verifying the Container](#verifying-the-container)
11-
5. [Accessing the Application](#accessing-the-application)
12-
6. [Stopping the Container](#stopping-the-container)
13-
7. [Troubleshooting](#troubleshooting)
14-
15-
## Prerequisites
16-
17-
Before you begin, ensure you have the Docker installed on your machine
18-
19-
- Verify the installation by running:
20-
```bash
21-
docker --version
22-
```
23-
24-
## Building the Docker Image
25-
26-
1. Open a terminal and navigate to your project's root directory.
27-
28-
2. Go to Backend directory
29-
30-
```bash
31-
cd backend
32-
```
33-
34-
3. Run the following command to build the Docker image, replacing `<image_name>` with your desired image name:
35-
36-
```bash
37-
docker build -t <image_name> .
38-
```
39-
40-
4. Wait for the build process to complete. This may take a few minutes depending on your internet speed and system performance.
41-
42-
## Running the Docker Container
43-
44-
Once the image is built, you can run a container using the following command:
45-
46-
```bash
47-
docker run -it --name backend-container -p 8000:8000 \
48-
-v images-data:/app/images \
49-
-v /:/host \
50-
<image-name>
51-
```
52-
53-
- `-it`: Runs the container interactively, attaching to the terminal for input/output.
54-
- `-p 8000:8000`: Maps port 8000 on the host to port 8000 in the container.
55-
- `-v`: Mounts a volume to share data between the host and container.
56-
- `<image_name>`: Specifies the image to use (the one we just built).
57-
58-
## Verifying the Container
59-
60-
To check if the container is running:
61-
62-
```bash
63-
docker ps
64-
```
65-
66-
You should see an entry for `<container_name>` with the status `Up`.
67-
68-
## Accessing the Application
69-
70-
Open a web browser or frontend to access the application at:
71-
72-
```
73-
http://localhost:8000
74-
```
75-
76-
## Stopping the Container
77-
78-
If you need to stop the container:
79-
80-
```bash
81-
docker kill <container_id>
82-
```
83-
84-
## Troubleshooting
85-
86-
1. **Port already in use**: If you get an error saying the port is already in use, you can either:
87-
88-
- Stop the process using port 8000, or
89-
- Change the port mapping in the `docker run` command (e.g., `-p 8001:8000`)
90-
91-
2. **Container exits immediately**: Check the container logs:
92-
93-
```bash
94-
docker logs <container_name>
95-
```
96-
97-
3. **Permission issues**: Ensure that `run.sh` has execute permissions(for linux only):
98-
99-
```bash
100-
chmod +x run.sh
101-
```
102-
103-
Then rebuild the Docker image.
104-
105-
Remember to rebuild your Docker image (`docker build -t <image_name> .`) after making any changes to your application or Dockerfile.
106-
107-
For more advanced Docker usage , view the [Docker documentation](https://docs.docker.com/get-started/).
1+
# Backend Docker Setup for PictoPy
2+
3+
This guide provides step-by-step instructions for building and running the PictoPy backend using Docker.
4+
5+
## Table of Contents
6+
7+
1. [Prerequisites](#prerequisites)
8+
2. [Building the Docker Image](#building-the-docker-image)
9+
3. [Running the Docker Container](#running-the-docker-container)
10+
4. [Verifying the Container](#verifying-the-container)
11+
5. [Accessing the Application](#accessing-the-application)
12+
6. [Stopping the Container](#stopping-the-container)
13+
7. [Troubleshooting](#troubleshooting)
14+
15+
## Prerequisites
16+
17+
Before you begin, ensure you have the Docker installed on your machine
18+
19+
- Verify the installation by running:
20+
```bash
21+
docker --version
22+
```
23+
24+
## Building the Docker Image
25+
26+
1. Open a terminal and navigate to your project's root directory.
27+
28+
2. Go to Backend directory
29+
30+
```bash
31+
cd backend
32+
```
33+
34+
3. Run the following command to build the Docker image, replacing `<image_name>` with your desired image name:
35+
36+
```bash
37+
docker build -t <image_name> .
38+
```
39+
40+
4. Wait for the build process to complete. This may take a few minutes depending on your internet speed and system performance.
41+
42+
## Running the Docker Container
43+
44+
Once the image is built, you can run a container using the following command:
45+
46+
```bash
47+
docker run -it --name backend-container -p 8000:8000 \
48+
-v images-data:/app/images \
49+
-v /:/host \
50+
<image-name>
51+
```
52+
53+
- `-it`: Runs the container interactively, attaching to the terminal for input/output.
54+
- `-p 8000:8000`: Maps port 8000 on the host to port 8000 in the container.
55+
- `-v`: Mounts a volume to share data between the host and container.
56+
- `<image_name>`: Specifies the image to use (the one we just built).
57+
58+
## Verifying the Container
59+
60+
To check if the container is running:
61+
62+
```bash
63+
docker ps
64+
```
65+
66+
You should see an entry for `<container_name>` with the status `Up`.
67+
68+
## Accessing the Application
69+
70+
Open a web browser or frontend to access the application at:
71+
72+
```
73+
http://localhost:8000
74+
```
75+
76+
## Stopping the Container
77+
78+
If you need to stop the container:
79+
80+
```bash
81+
docker kill <container_id>
82+
```
83+
84+
## Troubleshooting
85+
86+
1. **Port already in use**: If you get an error saying the port is already in use, you can either:
87+
88+
- Stop the process using port 8000, or
89+
- Change the port mapping in the `docker run` command (e.g., `-p 8001:8000`)
90+
91+
2. **Container exits immediately**: Check the container logs:
92+
93+
```bash
94+
docker logs <container_name>
95+
```
96+
97+
3. **Permission issues**: Ensure that `run.sh` has execute permissions(for linux only):
98+
99+
```bash
100+
chmod +x run.sh
101+
```
102+
103+
Then rebuild the Docker image.
104+
105+
Remember to rebuild your Docker image (`docker build -t <image_name> .`) after making any changes to your application or Dockerfile.
106+
107+
For more advanced Docker usage , view the [Docker documentation](https://docs.docker.com/get-started/).

docs/docker-compose/redme.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Docker Compose Setup
32

43
This repository includes a Docker Compose configuration to streamline the deployment of services for your application. By using Docker Compose, you can set up and run the entire stack with just a few commands.
@@ -18,39 +17,41 @@ docker-compose --version
1817
```
1918

2019
- For Linux : An X server also installed (If not installed)
21-
```bash
22-
sudo apt install x
23-
```
24-
Allow X11 forwarding:
25-
```bash
26-
xhost +local:docker
27-
```
2820

29-
- For Windows: An X Server (e.g., VcXsrv or Xming)
30-
- Start an X Server:
31-
1. Launch VcXsrv or Xming.
32-
2. Configure it to allow connections from any host.
21+
```bash
22+
sudo apt install x
23+
```
3324

34-
- Find your host machine's IP address:
35-
1. Open Command Prompt and run `ipconfig`.
36-
2. Look for the IPv4 Address under your active network adapter.
25+
Allow X11 forwarding:
3726

38-
- Run the container:
39-
```bash
40-
docker run -it -p 1420:1420 -e DISPLAY=<HOST_IP>:0.0 <image-name>
41-
```
42-
Replace `<HOST_IP>` with your actual IP address.
27+
```bash
28+
xhost +local:docker
29+
```
30+
31+
- For Windows: An X Server (e.g., VcXsrv or Xming)
4332

33+
- Start an X Server:
4434

35+
1. Launch VcXsrv or Xming.
36+
2. Configure it to allow connections from any host.
4537

38+
- Find your host machine's IP address:
4639

40+
1. Open Command Prompt and run `ipconfig`.
41+
2. Look for the IPv4 Address under your active network adapter.
42+
43+
- Run the container:
44+
```bash
45+
docker run -it -p 1420:1420 -e DISPLAY=<HOST_IP>:0.0 <image-name>
46+
```
47+
Replace `<HOST_IP>` with your actual IP address.
4748

4849
## Services
4950

5051
The Docker Compose file in this repository orchestrates the following services:
5152

5253
1. **Backend** : The application backend service.
53-
4. **Frontend** : The application frontend service.
54+
2. **Frontend** : The application frontend service.
5455

5556
## Getting Started
5657

@@ -74,6 +75,7 @@ dos2unix run.sh
7475
```
7576

7677
### Step 3 : Move to Actual Location (PictoPy)
78+
7779
```bash
7880
cd ..
7981
```
@@ -105,17 +107,16 @@ To stop services without removing the data:
105107
docker compose stop
106108
```
107109

108-
109110
## How to 'Add Folder' Instructions
110111

111112
Since Docker containers are isolated from each other, we cannot directly access the folders of other containers. This is where the concept of volume mounting comes into play.where if you run your application via docker then for adding folders of your host machine
112-
113-
1. Click the Path **Other Locations**
114-
2. Then click **Computer**
115-
3. After that click **host**
116-
117-
(Genrally in Linux , **C** and **D** Drive are located in **mnt** folder)
113+
114+
1. Click the Path **Other Locations**
115+
2. Then click **Computer**
116+
3. After that click **host**
117+
118+
(Genrally in Linux , **C** and **D** Drive are located in **mnt** folder)
118119

119120
Now in this **host** location all of your host machine's files are available now you can add any folder from this path .
120121
121-
At all if you face any problem Click the [Video Demo](https://s3.eu-north-1.amazonaws.com/jibeshroy.static.dev/Pictopy/FINAL_OUTPUT.mp4)
122+
At all if you face any problem Click the [Video Demo](https://s3.eu-north-1.amazonaws.com/jibeshroy.static.dev/Pictopy/FINAL_OUTPUT.mp4)

0 commit comments

Comments
 (0)