浏览代码

Dockerfile con FPM. Composer actualizado. Https en parameters.

Daniel Libonati 7 年之前
父节点
当前提交
41a3ad3731
共有 3 个文件被更改,包括 18 次插入12 次删除
  1. 12 6
      Dockerfile
  2. 3 3
      app/config/hwioauthbundle/parameters.yml.dist
  3. 3 3
      composer.lock

+ 12 - 6
Dockerfile

@@ -29,18 +29,24 @@ RUN pip install -e /opt/netmiko
 RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl ;  cd /opt/json-wsdl ; composer install --no-scripts --no-interaction --no-progress
 
 RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
-     cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
-     cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
+    cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
+    cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
     cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
     cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
 
+RUN apt-get update && apt-get install -yq php-fpm
+RUN sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = 0.0.0.0:9000#g' /etc/php/7.0/fpm/pool.d/www.conf
+RUN sed -i 's#;clear_env = no#clear_env = no#g' /etc/php/7.0/fpm/pool.d/www.conf
+RUN mkdir -p /run/php
+
 CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
     rm var/cache/* -rf ;\
     cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
-     cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
-     cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
+    cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
+    cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
     cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
     cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml ;\
     composer run-script post-install-cmd --no-interaction ;\
-     cat app/config/hwioauthbundle/parameters.yml ;\
-     bin/console server:run 0.0.0.0 --env=dev
+    cat app/config/hwioauthbundle/parameters.yml ;\
+    chmod 777 -R var/cache/ var/logs/ var/sessions/ ;\
+    php-fpm7.0 -F -R -O

+ 3 - 3
app/config/hwioauthbundle/parameters.yml.dist

@@ -1,6 +1,6 @@
 parameters:
     client_id:           "1_4201udjx8vsw0go8g84wsksg4o8ogoow0sosc8k44c8cscwssw"
     client_secret:       "42ymihqa8js408ggk4c0cccswcw8okcogww80co8cogsgc4woo"
-    access_token_url:    "http://127.0.0.1/base/app_dev.php/oauth/v2/token"
-    authorization_url:   "http://127.0.0.1/base/app_dev.php/oauth/v2/auth"
-    infos_url:           "http://127.0.0.1/base/app_dev.php/api/user/me"
+    access_token_url:    "https://127.0.0.1/base/app_dev.php/oauth/v2/token"
+    authorization_url:   "https://127.0.0.1/base/app_dev.php/oauth/v2/auth"
+    infos_url:           "https://127.0.0.1/base/app_dev.php/api/user/me"

+ 3 - 3
composer.lock

@@ -1954,7 +1954,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "db2c53f8e2757975d8b910d0a3ab776d62236006"
+                "reference": "30a35248a08d2677c0eb95769be905ce28731c2f"
             },
             "type": "library",
             "autoload": {
@@ -1969,7 +1969,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2018-05-11T17:56:14+00:00"
+            "time": "2018-05-17T18:14:39+00:00"
         },
         {
             "name": "ik/device-bundle",
@@ -6746,7 +6746,7 @@
         "voryx/restgeneratorbundle": 20
     },
     "prefer-stable": false,
-    "prefer-lowest": true,
+    "prefer-lowest": false,
     "platform": {
         "php": ">=5.5.9"
     },