فهرست منبع

cambie nombre db host

Luciano Andrade 7 سال پیش
والد
کامیت
9883e53a49
3فایلهای تغییر یافته به همراه14 افزوده شده و 12 حذف شده
  1. 3 1
      .drone.yml
  2. 6 6
      Dockerfile
  3. 5 5
      app/config/parameters.yml.dist

+ 3 - 1
.drone.yml

@@ -1,5 +1,5 @@
 services:
-  database:
+  mysql:
     image: mysql:5.5
     environment:
       - MYSQL_ROOT_PASSWORD=
@@ -24,6 +24,8 @@ pipeline:
       OAUTH_CLIENT_SECRET: ""
       AMQP_KEY: ""
       CLIENT: fd3
+      MYSQL_PASSWORD: ""
+
     commands:
       - command -v mysqladmin >/dev/null 2>&1 || { echo "I require mysqladmin but it's not installed.  Aborting." >&2; exit 1; }
       - while ! mysqladmin ping -h 127.0.0.1 --silent; do :; done

+ 6 - 6
Dockerfile

@@ -13,12 +13,12 @@ RUN rm -f app/config/bundles/ik/base-admin-bundle/parameters.yml
 RUN rm -f app/config/bundles/ik/device-bundle/parameters.yml
 RUN rm -f app/config/bundles/ik/webservice-bundle/parameters.yml
 
-RUN cp app/config/parameters.yml.docker app/config/parameters.yml
-RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
-RUN cp app/config/bundles/ik/audit-bundle/parameters.yml.dist app/config/bundles/ik/audit-bundle/parameters.yml
-RUN cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
-RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
-RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
+#RUN cp app/config/parameters.yml.docker app/config/parameters.yml
+#RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
+#RUN cp app/config/bundles/ik/audit-bundle/parameters.yml.dist app/config/bundles/ik/audit-bundle/parameters.yml
+#RUN cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
+#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
+#RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
 
 RUN chmod 0600 /opt/keys/*
 

+ 5 - 5
app/config/parameters.yml.dist

@@ -3,11 +3,11 @@
 # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
 parameters:
     database_driver:   pdo_mysql
-    database_host: 127.0.0.1
+    database_host: mysql
     database_port: ~
     database_name: fd3_cablemodem
     database_user: root
-    database_password: ~
+    database_password: %env(MYSQL_ROOT_PASSWORD)%
     # You should uncomment this if you want to use pdo_sqlite
     #database_path: '%kernel.project_dir%/var/data/data.sqlite'
 
@@ -22,17 +22,17 @@ parameters:
 
     # RabbitMQ parameters
     # amqp queue config
-    rabbit_mq.host:     127.0.0.1
+    rabbit_mq.host:     amqp
     rabbit_mq.port:     5672
     rabbit_mq.user:     'guest'
     rabbit_mq.password: 'guest'
     rabbit_mq.vhost:    '/'
 
-    db_session_host: 127.0.0.1
+    db_session_host: mysql
     db_session_port: null
     db_session_name: fd_session
     db_session_user: root
-    db_session_password: null
+    db_session_password: %env(MYSQL_ROOT_PASSWORD)%
 
     env(HOST_AMQP): amqp
     env(AMQP_KEY): cablemodem