dockerised-php icon indicating copy to clipboard operation
dockerised-php copied to clipboard

php service should have depends_on web service

Open LongLiveCHIEF opened this issue 6 years ago • 1 comments

If the web service is started before the php service, You'll get an nginx error:

[emerg] 1:1: host not found in upstream "php" in /etc/nginx/conf.d/default.conf:12

Amending the config for web like so will correct this problem:

web:
  # ... other configs
  depends_on:
    - php

LongLiveCHIEF avatar May 18 '19 16:05 LongLiveCHIEF

Thanks a lot, this option helped me. Nginx cannot parse php file and send the php file to user browser with the following options.

depends_on: 
 - php

jimmyyem avatar Nov 14 '20 02:11 jimmyyem