commit 289264926906572577f023478d7590461247318e
Author: ballakt <ballakt@zcu.cz>
Date:   Mon Apr 20 15:37:35 2020 +0000

    Re #7900 python3 and pip settings for container

diff --git a/.docker-compose-dev.yml b/.docker-compose-dev.yml
index 1501f0f..fc4c02e 100644
--- a/.docker-compose-dev.yml
+++ b/.docker-compose-dev.yml
@@ -1,17 +1,27 @@
 version: "3.2"
 services:
+       py-charm:
+                build:
+                        context: ./python-module
+                        dockerfile: '../build/php-fpm/dev/Dockerfile'
+                ports: 
+                        - "9001:9000"
+                volumes: 
+                        - ./python-module:/var/python-module
+ 
+                container_name: "heatmap_py_charm"
        php-fpm:
-               build: './build/php-fpm/dev'
+               build: ./build/php-fpm/dev/
                depends_on: 
                        - database
                networks:
                    - backend
                ports: 
-                       - "9001:9000"
+                       - "9000:9000"
                volumes:
                        - ./website/:/var/www/symfony
+                       - ./python-module:/var/python-module
                container_name: "heatmap_php_fpm"
-               
                environment:
                        XDEBUG_CONFIG: remote_host=172.17.0.1 #your docker network i TODO:NOT WORKING
        nginx:
diff --git a/.gitignore b/.gitignore
index 2da81d0..e13a823 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ cache
 .phpcs-cache
 .php_cs.cache
 database/
+.idea
\ No newline at end of file
diff --git a/README.md b/README.md
index b86819e..f9a22bc 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 
 ## 🔩 Development env
 
-* Install **latest php**,  **[🐳 docker](https://www.docker.com/)** and **[📝 vscode](https://code.visualstudio.com/)**
+* Install **latest php**,  **[🐳 docker](https://www.docker.com/)**, **[📝 vscode](https://code.visualstudio.com/)** and **[🐍PyCharm](https://www.jetbrains.com/pycharm/)**
 * Then run `./scripts/dev/build.sh` or `scripts/dev/build.bat` in the root of the project
 * When you run `docker ps` you should see these containers: **heatmap_nginx**, **heatmap_php-fpm** and **heatmap_mongodb**
 * Symfony project should be available on http://localhost:80
@@ -18,6 +18,26 @@
   * require `./scripts/composer.sh require package_name`
 ### PHP Linter in vscode
 * If you want check your code style is in the right format press <kbd>F1</kbd> choose `Tasks: Run Task` and `PHP Linter`
-* If you want to format the current file just press <kbd>F1</kbd> choose `Tasks: Run Task` and `Format`
+* If you want to format the current file just press <kbd>F1</kbd> choose 
+`Tasks: Run Task` and `Format`
+### PyCharm
+* First you need to set python interpeter to the containers by **following these steps**
+<div style="display: flex; flex-direction: row; justify-content: space-around;flex-wrap: wrap">
+  <div style="height: 450px; display: flex; justify-content: space-between;flex-direction: column;">
+  <img src="./guide/1.png" width="500px" style="display: block"/>
+  <p style="background: red">A. Enter Settings (File/Preferences/Settings)</p>
+  </div>
+  <div style="height: 450px; display: flex; justify-content: space-between; flex-direction: column;">
+  <img src="./guide/2.png" width="500px" height="360px" style="display: block"/>
+  <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>
+  </div>
+  <div style="height: 450px; display: flex; justify-content: space-between;flex-direction: column;">
+  <img src="./guide/3.png" width="500px" style="display: block"/>
+  <p style="background: red">C. When setup is ok you will see all packages from requirements on this screen</b></p>
+  </div>
+</div>
+
+* New dependencies put in **requirements.txt** and then run build `./scripts/dev/build.sh`
+
 ## 🚀 Production env
 * To run production env on your local machine execute this `./scripts/build.sh`
\ No newline at end of file
diff --git a/build/php-fpm/dev/Dockerfile b/build/php-fpm/dev/Dockerfile
index bfb1093..3c77379 100644
--- a/build/php-fpm/dev/Dockerfile
+++ b/build/php-fpm/dev/Dockerfile
@@ -17,13 +17,5 @@ RUN echo "**** install Python ****" && \
     pip3 install --no-cache --upgrade pip setuptools wheel && \
     if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
 
-
-COPY xdebug.ini /etc/php7/conf.d/xdebug.ini
-RUN echo -en "\n" >> /etc/php7/conf.d/xdebug.ini
-RUN apk --update --no-cache add autoconf g++ make && \
-    pecl install -f xdebug-2.9.4 && \
-    docker-php-ext-enable xdebug && \
-    apk del --purge autoconf g++ make
-RUN echo zend_extension="$(find / -name 'xdebug.so')" >> /etc/php7/conf.d/xdebug.ini
-RUN echo "**** install PHP Composer ****\n" && \
-    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
+COPY requirements.txt /requirements.txt
+RUN pip install -r /requirements.txt
\ No newline at end of file
diff --git a/build/php-fpm/dev/requirements.txt b/build/php-fpm/dev/requirements.txt
new file mode 100644
index 0000000..e69de29
diff --git a/docker-compose.yml b/docker-compose.yml
index d9b5e18..4f730e6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -10,6 +10,8 @@ services:
                        - "9000:9000"
                volumes:
                        - ./website/:/var/www/symfony
+                       - ./python-module:/var/python-module
+
                container_name: "heatmap_php_fpm"
        nginx:
                build: './build/nginx'
diff --git a/guide/1.png b/guide/1.png
new file mode 100644
index 0000000..d8237e7
Binary files /dev/null and b/guide/1.png differ
diff --git a/guide/2.png b/guide/2.png
new file mode 100644
index 0000000..05fbdb0
Binary files /dev/null and b/guide/2.png differ
diff --git a/guide/3.png b/guide/3.png
new file mode 100644
index 0000000..4c63e7b
Binary files /dev/null and b/guide/3.png differ
diff --git a/python-module/requirements.txt b/python-module/requirements.txt
new file mode 100644
index 0000000..a69a4a2
--- /dev/null
+++ b/python-module/requirements.txt
@@ -0,0 +1 @@
+ emoji===0.5.4
\ No newline at end of file
diff --git a/python-module/test.py b/python-module/test.py
new file mode 100644
index 0000000..f8317bb
--- /dev/null
+++ b/python-module/test.py
@@ -0,0 +1,2 @@
+import emoji
+print(emoji.emojize('Python is :thumbs_up:'))
diff --git a/scripts/build.sh b/scripts/build.sh
index fa3ca3b..ae1f409 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -2,4 +2,5 @@
 #Build development environment
 docker-compose down
 docker-compose up --build -d
-docker-compose exec -T php-fpm composer install --no-interaction --working-dir=/var/www/symfony --no-dev
\ No newline at end of file
+docker-compose exec -T php-fpm composer install --no-interaction --working-dir=/var/www/symfony --no-dev
+docker-compose exec -T php-fpm pip install -r /var/python-module/requirements.txt
\ No newline at end of file
diff --git a/scripts/composer.sh b/scripts/composer.sh
index e6a594a..8bf9feb 100755
--- a/scripts/composer.sh
+++ b/scripts/composer.sh
@@ -7,4 +7,4 @@ cat << "EOF"
  \ \_____\ \_____\ \_\ \ \_\ \_\  \ \_____\/\_____\ \_____\ \_\ \_\
   \/_____/\/_____/\/_/  \/_/\/_/   \/_____/\/_____/\/_____/\/_/ /_/
 EOF
-docker-compose exec php-fpm composer --working-dir=/var/www/symfony $@
+docker-compose exec -T php-fpm composer --working-dir=/var/www/symfony $@
diff --git a/scripts/dev/build.sh b/scripts/dev/build.sh
index 4a7012f..b59d294 100755
--- a/scripts/dev/build.sh
+++ b/scripts/dev/build.sh
@@ -2,6 +2,7 @@
 #Build development environment
 docker-compose down
 docker-compose -f .docker-compose-dev.yml up --build -d
+
 cat << "EOF"
  ______  ______  __    __  ______ ______  ______  ______  ______       __  __   __  ______  ______ ______  __      __        
 /\  ___\/\  __ \/\ "-./  \/\  == /\  __ \/\  ___\/\  ___\/\  == \     /\ \/\ "-.\ \/\  ___\/\__  _/\  __ \/\ \    /\ \       
@@ -9,4 +10,12 @@ cat << "EOF"
  \ \_____\ \_____\ \_\ \ \_\ \_\  \ \_____\/\_____\ \_____\ \_\ \_\    \ \_\ \_\\"\_\/\_____\ \ \_\\ \_\ \_\ \_____\ \_____\ 
   \/_____/\/_____/\/_/  \/_/\/_/   \/_____/\/_____/\/_____/\/_/ /_/     \/_/\/_/ \/_/\/_____/  \/_/ \/_/\/_/\/_____/\/_____/                                                                                                                                                                                                                                                                                                                                                                                                                                      
 EOF
-docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony
\ No newline at end of file
+docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony
+cat << "EOF"
+ ______  __   ______     __   __   __   ______   ______  ______   __       __        
+/\  == \/\ \ /\  == \   /\ \ /\ "-.\ \ /\  ___\ /\__  _\/\  __ \ /\ \     /\ \       
+\ \  _-/\ \ \\ \  _-/   \ \ \\ \ \-.  \\ \___  \\/_/\ \/\ \  __ \\ \ \____\ \ \____  
+ \ \_\   \ \_\\ \_\      \ \_\\ \_\\"\_\\/\_____\  \ \_\ \ \_\ \_\\ \_____\\ \_____\ 
+  \/_/    \/_/ \/_/       \/_/ \/_/ \/_/ \/_____/   \/_/  \/_/\/_/ \/_____/ \/_____/                                                                                                                                                                                     
+EOF
+docker-compose exec php-fpm pip install -r /var/python-module/requirements.txt
diff --git a/scripts/dev/composer.bat b/scripts/dev/composer.bat
index 6842298..4b9b9d3 100644
--- a/scripts/dev/composer.bat
+++ b/scripts/dev/composer.bat
@@ -1 +1 @@
-docker run --rm --interactive --tty --volume %CD%:/app composer %*
+docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony
diff --git a/scripts/dev/pip.bat b/scripts/dev/pip.bat
new file mode 100644
index 0000000..e89eccc
--- /dev/null
+++ b/scripts/dev/pip.bat
@@ -0,0 +1 @@
+docker-compose exec -T php-fpm pip install -r /var/python/requirements.txt
\ No newline at end of file
diff --git a/scripts/pip.sh b/scripts/pip.sh
new file mode 100644
index 0000000..320eb46
--- /dev/null
+++ b/scripts/pip.sh
@@ -0,0 +1,2 @@
+#install requirements pips.sh install -r /var/python/requirements.txt
+docker-compose exec -T php-fpm pip $@
\ No newline at end of file
