Projekt

Obecné

Profil

Stáhnout (2.48 KB) Statistiky
| Větev: | Revize:
1
# ZČU Heatmap
2

    
3
- [**Nginx**](https://www.nginx.com/) - Server
4
- [**Symfony**](https://symfony.com/) - PHP framework
5
- [**MongoDB**](https://www.mongodb.com/) - Database
6

    
7
## 🔩 Development env
8

    
9
* Install **latest php**,  **[🐳 docker](https://www.docker.com/)**, **[📝 vscode](https://code.visualstudio.com/)** and **[🐍PyCharm](https://www.jetbrains.com/pycharm/)**
10
* Then run `./scripts/dev/build.sh` or `scripts/dev/build.bat` in the root of the project
11
* When you run `docker ps` you should see these containers: **heatmap_nginx**, **heatmap_php-fpm** and **heatmap_mongodb**
12
* Symfony project should be available on http://localhost:80
13
* ❗IMPORTANT❗make sure you are developing in vscode workspace for symfony
14
  * To get into workspace click on `symfony.code-workspace` and on bottom right <kbd>Open Workspace</kbd> 
15
### PHP Composer
16
* For composer commands `./scripts/composer.sh` and provide args
17
  * install `./scripts/composer.sh install`
18
  * require `./scripts/composer.sh require package_name`
19
### PHP Linter in vscode
20
* If you want check your code style is in the right format press <kbd>F1</kbd> choose `Tasks: Run Task` and `PHP Linter`
21
* If you want to format the current file just press <kbd>F1</kbd> choose 
22
`Tasks: Run Task` and `Format`
23
### PyCharm
24
* First you need to set python interpeter to the containers by **following these steps**
25
<div style="display: flex; flex-direction: row; justify-content: space-around;flex-wrap: wrap">
26
  <div style="height: 450px; display: flex; justify-content: space-between;flex-direction: column;">
27
  <img src="./guide/1.png" width="500px" style="display: block"/>
28
  <p style="background: red">A. Enter Settings (File/Preferences/Settings)</p>
29
  </div>
30
  <div style="height: 450px; display: flex; justify-content: space-between; flex-direction: column;">
31
  <img src="./guide/2.png" width="500px" height="360px" style="display: block"/>
32
  <p style="background: red">B. In the left panel choose <b>Docker</b> and in <b>Image Name</b> choose <b>heatmap_py-charm</b></p>
33
  </div>
34
  <div style="height: 450px; display: flex; justify-content: space-between;flex-direction: column;">
35
  <img src="./guide/3.png" width="500px" style="display: block"/>
36
  <p style="background: red">C. When setup is ok you will see all packages from requirements on this screen</b></p>
37
  </div>
38
</div>
39

    
40
* New dependencies put in **requirements.txt** and then run build `./scripts/dev/build.sh`
41

    
42
## 🚀 Production env
43
* To run production env on your local machine execute this `./scripts/build.sh`
(4-4/5)