evertramos / docker-wordpress

Wordpress Docker container using SSL Certificates with LetsEncrypt
https://evertramos.github.io/docker-wordpress/
MIT License
484 stars 156 forks source link

Update docker-compose.yml #4

Closed chuegel closed 7 years ago

chuegel commented 7 years ago

When behind proxy, the theme function doesn't work throwing the error: https://github.com/evertramos/wordpress-docker-letsencrypt/issues/3#issuecomment-330257104 Increasing the request timeout for api.wordpress.org can also be done in functions.php with following code:

// increase `timeout` for `api.wordpress.org` requests
add_filter( 'http_request_args', function( $request, $url ) {

    if ( strpos( $url, '://api.wordpress.org/' ) !== false ) {
        $request[ 'timeout' ] = 15;
    }

    return $request;

}, 10, 2 );

or adding DNS of api.wordpress.com to /etc/hosts file.

evertramos commented 7 years ago

As far as I have tested it worked fine at my end. Thanks for the effort. I will try to test over but not sure it will be necessary. thanks