From 00018c9c58229d1f9cdda9c9fb682fd9a77f727c Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 21 Sep 2015 18:24:21 +0800 Subject: [PATCH] add revive --- revive/Dockerfile | 31 +++++++++++++++++++++++++++++++ revive/README.md | 4 ++++ revive/docker-compose.yml | 14 ++++++++++++++ revive/nginx.conf | 26 ++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 revive/Dockerfile create mode 100644 revive/README.md create mode 100644 revive/docker-compose.yml create mode 100644 revive/nginx.conf diff --git a/revive/Dockerfile b/revive/Dockerfile new file mode 100644 index 0000000..1496296 --- /dev/null +++ b/revive/Dockerfile @@ -0,0 +1,31 @@ +# +# Dockerfile for revive +# + +FROM alpine +MAINTAINER kev + +WORKDIR /var/www/html + +RUN apk add -U git \ + gzip \ + nginx \ + php-apcu \ + php-curl \ + php-fpm \ + php-gd \ + php-mysql \ + php-openssl \ + php-phar \ + php-xml \ + php-zlib \ + tar \ + && wget -O- http://download.revive-adserver.com/revive-adserver-3.2.1.tar.gz | tar xz --strip 1 \ + && chown -R nobody:nobody . \ + && rm -rf /var/cache/apk/* + +COPY nginx.conf /etc/nginx/nginx.conf + +EXPOSE 80 + +CMD php-fpm && nginx -g 'daemon off;' diff --git a/revive/README.md b/revive/README.md new file mode 100644 index 0000000..b241ae2 --- /dev/null +++ b/revive/README.md @@ -0,0 +1,4 @@ +revive +====== + +The Free Open Source Ad Server formerly known as OpenX Source. diff --git a/revive/docker-compose.yml b/revive/docker-compose.yml new file mode 100644 index 0000000..f041c05 --- /dev/null +++ b/revive/docker-compose.yml @@ -0,0 +1,14 @@ +revive: + image: vimagick/revive + ports: + - "8080:80" + links: + - mysql + restart: always + +mysql: + image: mysql + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=revive + restart: always diff --git a/revive/nginx.conf b/revive/nginx.conf new file mode 100644 index 0000000..ca7ba23 --- /dev/null +++ b/revive/nginx.conf @@ -0,0 +1,26 @@ +user nobody; +worker_processes 4; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + + server { + listen 80; + server_name _; + root /var/www/html; + index index.php; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_pass 127.0.0.1:9000; + } + } +}