Skip to content

Commit

Permalink
Add PHP_GRPC_ env vars for configuring grpc extension
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Jan 19, 2024
1 parent f78a708 commit 5fce738
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 89 deletions.
1 change: 1 addition & 0 deletions 8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ process_templates() {
_gotpl "docker-php-${php_ver_minor}.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php.ini"
_gotpl "docker-php-ext-apcu.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"
_gotpl "docker-php-ext-brotli.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-brotli.ini"
_gotpl "docker-php-ext-grpc.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-grpc.ini"
_gotpl "docker-php-ext-igbinary.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"
_gotpl "docker-php-ext-xhprof.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-xhprof.ini"
_gotpl "docker-php-ext-xdebug.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini"
Expand Down
9 changes: 9 additions & 0 deletions 8/templates/docker-php-ext-grpc.ini.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[grpc]
extension=grpc.so
grpc.enable_fork_support = {{ getenv "PHP_GRPC_ENABLE_FORK_SUPPORT" "1" }}
grpc.poll_strategy = {{ getenv "PHP_GRPC_POLL_STRATEGY" "epoll1" }}
grpc.grpc_verbosity = {{ getenv "PHP_GRPC_VERBOSITY" "error" }}
grpc.log_filename = {{ getenv "PHP_GRPC_LOG_FILENAME" "/proc/self/fd/2" }}
{{- if getenv "PHP_GRPC_TRACE" }}
grpc.grpc_trace = {{ getenv "PHP_GRPC_TRACE" }}
{{- end }}
Loading

0 comments on commit 5fce738

Please sign in to comment.