Skip to content

Commit 7f495b8

Browse files
committed
updated readme
1 parent d930289 commit 7f495b8

File tree

1 file changed

+13
-47
lines changed

1 file changed

+13
-47
lines changed

README.md

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,15 @@
1-
# Repo for potolok flask app
1+
# Segments accounting
22

3-
Порядок установки:
4-
- установить зависимости:
5-
```
6-
~ $ sudo apt-get install python3-pip python3-virtualenv nginx virtualenv
7-
```
8-
- создать рабочий каталог и перейти в него:
9-
```
10-
~ $ mkdir project && cd $_
11-
```
12-
- создаём новое окружение:
13-
```
14-
~/project $ virtualenv -p python3 .
15-
```
16-
- активируем его:
17-
```
18-
~/project $ source bin/activate
19-
(project) ~/project $
20-
```
21-
- клонируем этот репозиторий:
22-
```
23-
(project) ~/project $ git clone https://github.com/conformist-mw/potolok.git
24-
```
25-
- переходим в каталог с репозиторием и устанавливаем все необходимые зависимости:
26-
```
27-
(project) ~/project $ cd potolok/
28-
(project) ~/project/potolok $ pip install -r requirements.txt
29-
```
30-
- проверяем работоспособность:
31-
```
32-
(project) ~/project/potolok $ python server.py
33-
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
34-
```
35-
- выходим:
36-
```
37-
(project) ~/project/potolok $ deactivate
38-
```
39-
- копируем конфиги nginx и systemd в соответствующие каталоги, создаём ссылку, перезапускаем:
40-
```
41-
~/project/potolok $ sudo cp etc/nginx/sites-available/project /etc/nginx/sites-available/
42-
~/project/potolok $ sudo ln -s /etc/nginx/sites-available/project /etc/nginx/sites-enabled/
43-
~/project/potolok $ sudo cp etc/systemd/system/project.service /etc/systemd/system/
44-
~/project/potolok $ sudo systemctl daemon-reload
45-
~/project/potolok $ sudo systemctl start project.service
46-
~/project/potolok $ sudo systemctl enable project.service
47-
~/project/potolok $ sudo systemctl restart nginx.service
3+
This project allows you doing segments (rectangles) accounting by size, type or color. Removed segments doesn't remove from database just mark them as inactive. Also removed segments have order number.
4+
5+
## Installation
6+
7+
In order to install this project you have to download [autodeploy.sh](https://raw.githubusercontent.com/conformist-mw/segments/master/autodeploy.sh) script and run it as sudo user.
8+
9+
It will create dir named `project` in your home directory and python virtualenv within it. Sudo writes needs to create systemd service file for `gunicorn` and `nginx` default server.
10+
So you can run in terminal:
11+
12+
```bash
13+
$ sudo bash autodeploy.sh
4814
```
49-
Теперь можно переходить по [ссылке](http://localhost), должно работать.
15+
After this your project avaiable [here](http://localhost).

0 commit comments

Comments
 (0)