mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-25 00:08:49 +00:00
add nginad
This commit is contained in:
parent
119c5fcfb2
commit
46ba1c9c12
40
nginad/Dockerfile
Normal file
40
nginad/Dockerfile
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for nginad
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
RUN apk add -U ca-certificates \
|
||||||
|
git \
|
||||||
|
gzip \
|
||||||
|
nginx \
|
||||||
|
php-fpm \
|
||||||
|
php-json \
|
||||||
|
php-openssl \
|
||||||
|
php-pdo \
|
||||||
|
php-phar \
|
||||||
|
php-xml \
|
||||||
|
php-zlib \
|
||||||
|
tar \
|
||||||
|
&& wget -O- https://github.com/nginadfoundation/nginad/archive/1.6.5.tar.gz | tar xz --strip 1 \
|
||||||
|
&& cd upload \
|
||||||
|
&& php composer.phar self-update \
|
||||||
|
&& php composer.phar install \
|
||||||
|
&& cd config/autoload \
|
||||||
|
&& cp database.local.php.dist database.local.php \
|
||||||
|
&& cp delivery.local.php.dist delivery.local.php \
|
||||||
|
&& cp email.local.php.dist email.local.php \
|
||||||
|
&& cp rtb.config.local.php.dist rtb.config.local.php \
|
||||||
|
&& sed -i -e "s/'pass' => ''/'pass' => 'root'/" \
|
||||||
|
-e "s/'host' => 'localhost'/'host' => 'mysql'/" database.local.php \
|
||||||
|
&& 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;'
|
2
nginad/README.md
Normal file
2
nginad/README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
nginad
|
||||||
|
======
|
14
nginad/docker-compose.yml
Normal file
14
nginad/docker-compose.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
nginad:
|
||||||
|
image: vimagick/nginad
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
|
- MYSQL_DATABASE=nginad
|
||||||
|
restart: always
|
27
nginad/nginx.conf
Normal file
27
nginad/nginx.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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/upload/public/;
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param REDIRECT_STATUS 200;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user