File tree Expand file tree Collapse file tree 6 files changed +57
-13
lines changed Expand file tree Collapse file tree 6 files changed +57
-13
lines changed Original file line number Diff line number Diff line change 1
1
# delivery-service
2
2
> Сервис поиска ближайших машин для перевозки грузов.
3
+ <img src="docs/images/main_page.jpg" width=800>
4
+
5
+ ---
3
6
### Установка
4
- В корневой директории выполните команду
7
+ В корневой директории выполните команду:
5
8
``` sh
6
- docker compose up -v --built
9
+ docker compose up -d --built
7
10
```
8
11
9
12
### Просмотр
10
- Перейдите по адресу ` 0.0.0.0:8083/ ` для просмотра карты с грузами и машинами или ` 0.0.0.0:8001/docs/ ` для работы с API сервиса.
13
+ Перейдите по адресу ` 0.0.0.0:8083 ` для просмотра карты с грузами и машинами или ` 0.0.0.0:8001 ` для работы с API сервиса.
14
+
15
+ ### Архитектура
16
+ ``` mermaid
17
+ flowchart LR
18
+ subgraph server [Server]
19
+ direction TB
20
+
21
+ subgraph db [Databases]
22
+ direction TB
23
+ db1[(PostGis)]
24
+ end
25
+ db1 <--> b1
26
+ subgraph b1 [Backend]
27
+ direction LR
28
+ b2[[Cars API]]
29
+ b3[[Cargo API]]
30
+ end
31
+
32
+ ng{{Nginx}} <--> b1
33
+ react[[ReactJS]]
34
+ ng <-- GraphQL --> react
35
+ end
36
+
37
+ subgraph cls [Clients]
38
+ direction LR
39
+ cl1([Client 1])
40
+ cl2([Client 2])
41
+ end
42
+ react <-. WEB .-> cls
43
+ ng <-. REST API .-> cls
44
+ ```
45
+ Сервис разделен на три части:
46
+ - База данных PostGis
47
+ - Backend на FastAPI
48
+ - Frontend на ReactJS
49
+
50
+ ### License
51
+ Copyright © 2023 [ dsuhoi] ( https://github.com/dsuhoi ) .
52
+
53
+ This project is [ MIT] ( https://github.com/dsuhoi/delivery-service/blob/main/LICENSE ) licensed.
Original file line number Diff line number Diff line change @@ -6,11 +6,6 @@ RUN apt-get update && apt-get install -y libpq-dev netcat
6
6
RUN pip3 install poetry
7
7
8
8
COPY . .
9
- # COPY *.py locations.csv pytest.ini poetry.lock pyproject.toml ./
10
- # COPY core/ ./core/
11
- # COPY routers/ ./routers/
12
- # COPY tasks/ ./tasks/
13
- # COPY tests/ ./tests/
14
9
15
10
RUN poetry config virtualenvs.create false \
16
11
&& poetry install --no-interaction --no-ansi
Original file line number Diff line number Diff line change
1
+ # Git
2
+ .git
3
+ .gitignore
4
+
5
+ ** /node_modules /
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ WORKDIR /frontend_app
4
4
5
5
ENV PATH /app/node_modules/.bin:$PATH
6
6
7
- COPY package.json package-lock.json ./
8
- COPY src/ ./src/
9
- COPY public/ ./public/
7
+ COPY . .
10
8
11
9
RUN npm install
12
10
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ http {
10
10
gzip_disable "MSIE [1-6]\." ;
11
11
12
12
upstream frontend {
13
- server frontend:3001 ;
13
+ server frontend:3000 ;
14
14
}
15
15
16
16
upstream backend {
17
- server backend:8001 ;
17
+ server backend:8000 ;
18
18
}
19
19
20
20
server {
27
27
location /api {
28
28
rewrite /api/(.*) /$1 break;
29
29
proxy_pass http://backend;
30
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
31
+ proxy_set_header Host $http_host ;
32
+ proxy_http_version 1.1 ;
30
33
}
31
34
}
32
35
}
You can’t perform that action at this time.
0 commit comments