Merge pull request #174 from orette/add-hhvm

Add hhvm
This commit is contained in:
Mahmoud Zalt 2016-07-24 07:27:40 +03:00 committed by GitHub
commit 05e1dd4c13
5 changed files with 62 additions and 4 deletions

3
.env
View File

@ -1 +1,2 @@
INSTALL_PRESTISSIMO=false INSTALL_PRESTISSIMO=false
PHP_PROCESS_MANAGER=php-fpm

View File

@ -5,7 +5,10 @@ services:
### Nginx Server Container ################################## ### Nginx Server Container ##################################
nginx: nginx:
build: ./nginx build:
context: ./nginx
args:
- PHP_UPSTREAM=${PHP_PROCESS_MANAGER}
volumes_from: volumes_from:
- volumes_source - volumes_source
volumes: volumes:
@ -14,7 +17,7 @@ services:
- "80:80" - "80:80"
- "443:443" - "443:443"
links: links:
- php-fpm - ${PHP_PROCESS_MANAGER}
### PHP-FPM Container ####################################### ### PHP-FPM Container #######################################
@ -29,6 +32,17 @@ services:
links: links:
- workspace - workspace
### HHVM Container ##########################################
hhvm:
build: ./hhvm
volumes_from:
- volumes_source
expose:
- "9000"
links:
- workspace
### MySQL Container ######################################### ### MySQL Container #########################################
mysql: mysql:

21
hhvm/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM ubuntu:14.04
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 \
&& 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/laravel
ADD server.ini /etc/hhvm/server.ini
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
CMD ["/usr/bin/hhvm", "-m", "server", "-c", "/etc/hhvm/server.ini"]
EXPOSE 9000

20
hhvm/server.ini Normal file
View File

@ -0,0 +1,20 @@
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.server.error_document404 = index.php
hhvm.server.upload.upload_max_file_size = 25M
hhvm.log.level = Error
hhvm.log.header = true
hhvm.log.access[default][file] = /var/log/hhvm/access.log
hhvm.log.access[default][format] = "%h %l %u %t \"%r\" %>s %b"
hhvm.server.source_root=/var/www/laravel/public
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
; Uncomment to log to files instead of STDOUT
;hhvm.log.use_log_file = true
;hhvm.log.file = /var/log/hhvm/error.log

View File

@ -5,7 +5,9 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD nginx.conf /etc/nginx/ ADD nginx.conf /etc/nginx/
ADD laravel.conf /etc/nginx/sites-available/ ADD laravel.conf /etc/nginx/sites-available/
RUN echo "upstream php-upstream { server php-fpm:9000; }" > /etc/nginx/conf.d/upstream.conf ARG PHP_UPSTREAM
RUN echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data