Projekt

Obecné

Profil

Stáhnout (3.25 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 ab32aaaf Tomáš Ballák
### SW needed for development
9
* **[🐳 docker](https://docs.docker.com/engine/install)**
10
* **[🐳 docker-compose](https://docs.docker.com/compose/install/)**
11
* **[📝 Visual Studio Code](https://code.visualstudio.com/Download)**
12
### Development setup
13
* First you need to **build** and **run** all needed containers
14
  * run either of these scripts inside the **root of the project**:
15
    * Linux: `./scripts/dev/build.sh`
16
    * Windows: `scripts/dev/build.bat`
17
  * check if all containers are running by `docker ps -a`
18
  * now if you open **[localhost](https://localhost:80)** you should see working website
19
* Install needed extensions inside vscode
20
  * open the project folder with vscode
21
  * if you are prompt to install recommended extensions in the right bottom corner click on it (wait for installation to complete)
22
  * if **there is no popup for installation** do this: click <img src="./doc/images/extension.png" height="40px" width="40px"/>, <img src="./doc/images/more.png" height="40px" width="40px"/> and choose `Show Recommended extensions` and install extension which is in section **WORKSPACE RECOMMENDATIONS** (`ms-vscode-remote.remote-containers`)
23
  * You may be asked to **reload vscode** (blue label inside extension with text)
24
### Symfony (`./website`)
25
* To make changes inside symfony module click on file `symfony.code-workspace` which is in `website` folder
26
* Click on <kbd>Open Workspace</kbd> at the bottom of the screen, wait
27
* Click on <kbd>Reopen in Container</kbd>
28
* Now you are inside the **docker container**. You should see something like this in the bottom left corner
29 9350c44f ballakt
30 ab32aaaf Tomáš Ballák
</br>
31
</br>
32
<img src="./doc/images/dev-container.png">
33 9350c44f ballakt
34 ab32aaaf Tomáš Ballák
* To **close attach or reopen project in container** use these arrows
35
* Now **install recommended extension.**
36
* If you need to run `compose` commands simply open vscode terminal and run your commands there.
37
* If you want to format all your code inside `src` <kbd>F1 >> Tasks: Run Task >> Format</kbd>
38 bca5a3a8 ballakt
* If you want to compile your `sass` files just open file and then hit <kbd>F1 >> Compile - Easy Compile </kbd>.
39
* If you want to also minify hit <kbd>F1 >> Minify Easy Compile</kbd>. 
40 ab32aaaf Tomáš Ballák
* Your code should be formated while you are writing 
41
* Everything is set 🏆🎉
42
### Crawler (`./modules/crawler`)
43
To make changes inside crawler module click on file `python.code-workspace` which is in `./modules/crawler` folder
44
* Click on <kbd>Open Workspace</kbd> at the bottom of the screen, wait
45
* Click on <kbd>Reopen in Container</kbd>
46
* Now you are inside the **docker container**. You should see something like this in the bottom left corner
47 9350c44f ballakt
48 ab32aaaf Tomáš Ballák
</br>
49
</br>
50
<img src="./doc/images/dev-container.png">
51 9350c44f ballakt
52 ab32aaaf Tomáš Ballák
* To **close attach or reopen project in container** use these arrows
53
* Now **install recommended extension.**
54
* If you need to run `pip` or `python` commands simply open vscode terminal and run your commands there.
55
* Everything is set 🏆🎉
56 579f9cdd Tomáš Ballák
57 ab32aaaf Tomáš Ballák
### Debuging
58
* Set your breakpoints and hit <kbd>F5</kbd> or goto <kbd>Run >> Start debugging</kbd>
59
* Working in both modules
60 6f6156eb ballakt
## 🚀 Production env
61
* To run production env on your local machine execute this `./scripts/build.sh`