kamly commented on code in PR #487:
URL: https://github.com/apache/apisix-docker/pull/487#discussion_r1306910392


##########
centos/docker-entrypoint.sh:
##########
@@ -29,11 +29,13 @@ deployment:
     config_provider: yaml
 _EOC_
 
-        cat > ${PREFIX}/conf/apisix.yaml << _EOC_
+        if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then

Review Comment:
   > 
[This](https://github.com/apache/apisix-docker/pull/487/files#diff-8c251a9432dc64cc4a02088f433622d5bd6833832d0214fe045623021b226b92R25)
 line is not protected by the if block so there will be override anyways. 
Shouldn't this if block moved upwards to protect the whole block?
   
   Do you mean: Can `conf/config.yaml` be overwritten ?
   
   In my opinion, if `$APISIX_STAND_ALONE==true` is true, the content of 
`conf/config.yaml` should be reset
   
   conf/config.yaml
   ```
   deployment:
     role: data_plane     
     role_data_plane:
       config_provider: yaml
   ```



##########
centos/docker-entrypoint.sh:
##########
@@ -29,11 +29,13 @@ deployment:
     config_provider: yaml
 _EOC_
 
-        cat > ${PREFIX}/conf/apisix.yaml << _EOC_
+        if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then

Review Comment:
   > 
[This](https://github.com/apache/apisix-docker/pull/487/files#diff-8c251a9432dc64cc4a02088f433622d5bd6833832d0214fe045623021b226b92R25)
 line is not protected by the if block so there will be override anyways. 
Shouldn't this if block moved upwards to protect the whole block?
   
   Do you mean: Can `conf/config.yaml` be overwritten ?
   
   In my opinion, if `$APISIX_STAND_ALONE==true` is true, the content of 
`conf/config.yaml` should be reset
   
   conf/config.yaml
   ```
   deployment:
     role: data_plane     
     role_data_plane:
       config_provider: yaml
   ```
   
   cc @Revolyssup 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to