[英]Config Laradock with Nginx HHVM and MongoDB
How can I config Laradock to run project with Nginx
, HHVM
and MongoDB
?如何配置Laradock以使用
Nginx
、 HHVM
和MongoDB
运行项目?
I edit my .env
file and change PHP_INTERPRETER
from php-fpm
to hhvm
but nothing happens and the project still runs with php-fpm
.我编辑了我的
.env
文件并将PHP_INTERPRETER
从php-fpm
更改为hhvm
但没有任何反应并且项目仍然使用php-fpm
运行。
Here is part of my .env file:这是我的 .env 文件的一部分:
...
PHP_INTERPRETER=hhvm
...
### NGINX ##############################################################################################################
NGINX_HOST_HTTP_PORT=80
NGINX_HOST_HTTPS_PORT=443
NGINX_HOST_LOG_PATH=./logs/nginx/
NGINX_SITES_PATH=./nginx/sites/
NGINX_PHP_UPSTREAM_CONTAINER=hhvm
NGINX_PHP_UPSTREAM_PORT=9000
...
edit laradock/hhvm/Dockerfile编辑 laradock/hhvm/Dockerfile
Add user options添加用户选项
USER www-data
CMD ["/usr/bin/hhvm", "--user", "www-data", "-m", "server", "-c", "/etc/hhvm/server.ini"]
the whole file will like整个文件都会喜欢
FROM ubuntu:14.04
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
RUN apt-get update -y \
&& apt-get install -y software-properties-common wget \
&& wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - \
&& add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main" \
&& apt-get update -y \
&& apt-get install -y hhvm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/www
COPY server.ini /etc/hhvm/server.ini
RUN usermod -u 1000 www-data
WORKDIR /var/www
USER www-data
CMD ["/usr/bin/hhvm", "--user", "www-data", "-m", "server", "-c", "/etc/hhvm/server.ini"]
EXPOSE 9000
then rebuild hhvm, it works for me然后重建 hhvm,它对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.