Projekt

Obecné

Profil

Stáhnout (2.48 KB) Statistiky
| Větev: | Revize:
1 579f9cdd Tomáš Ballák
# ZČU Heatmap
2
3
- [**Nginx**](https://www.nginx.com/) - Server
4 6f6156eb ballakt
- [**Symfony**](https://symfony.com/) - PHP framework
5 579f9cdd Tomáš Ballák
- [**MongoDB**](https://www.mongodb.com/) - Database
6
7 9ef136b9 ballakt
## 🔩 Development env
8 579f9cdd Tomáš Ballák
9 28926492 ballakt
* Install **latest php**,  **[🐳 docker](https://www.docker.com/)**, **[📝 vscode](https://code.visualstudio.com/)** and **[🐍PyCharm](https://www.jetbrains.com/pycharm/)**
10 6f6156eb ballakt
* Then run `./scripts/dev/build.sh` or `scripts/dev/build.bat` in the root of the project
11 ed14fe3c ballakt
* When you run `docker ps` you should see these containers: **heatmap_nginx**, **heatmap_php-fpm** and **heatmap_mongodb**
12 6f6156eb ballakt
* 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 b591d025 ballakt
### PHP Composer
16 f0509357 ballakt
* For composer commands `./scripts/composer.sh` and provide args
17 6f6156eb ballakt
  * 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 28926492 ballakt
* 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 6f6156eb ballakt
## 🚀 Production env
43
* To run production env on your local machine execute this `./scripts/build.sh`