-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web: switched to alpine + nginx (#11)
- Loading branch information
Showing
9 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM php:7.0-apache | ||
FROM php:7.1-fpm-alpine | ||
MAINTAINER Jeffrey Boehm "[email protected]" | ||
|
||
ENV MYSQL_HOST=db \ | ||
|
@@ -8,8 +8,24 @@ ENV MYSQL_HOST=db \ | |
MANAGER_URL=http://www.grs-service.ch/pub/grs_mgr_v3-03_jessie_with_php7_setup.tgz \ | ||
WEBMAIL_URL=http://github.com/roundcube/roundcubemail/releases/download/1.2.0/roundcubemail-1.2.0.tar.gz | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y wget zlib1g-dev \ | ||
&& docker-php-ext-install mysqli pdo_mysql zip | ||
RUN apk --no-cache add \ | ||
nginx \ | ||
supervisor \ | ||
wget \ | ||
ca-certificates \ | ||
libmcrypt-dev \ | ||
libpng-dev && \ | ||
docker-php-ext-install -j4 \ | ||
mcrypt \ | ||
zip \ | ||
mysqli \ | ||
pdo_mysql && \ | ||
ln -sf /dev/stdout /var/log/nginx/access.log && \ | ||
ln -sf /dev/stderr /var/log/nginx/error.log && \ | ||
ln -s /usr/local/bin/php /usr/bin/php && \ | ||
rm -rf /var/lib/nginx/tmp && \ | ||
ln -sf /tmp /var/lib/nginx/tmp && \ | ||
update-ca-certificates | ||
|
||
WORKDIR /var/www/html/manager | ||
RUN wget -q -O- $MANAGER_URL | tar -zx \ | ||
|
@@ -23,4 +39,6 @@ RUN wget -q -O- --no-check-certificate $WEBMAIL_URL | tar --strip 1 -zx \ | |
&& rm -rf installer/ | ||
|
||
WORKDIR /var/www/html | ||
COPY rootfs/ ./ | ||
COPY rootfs/ / | ||
|
||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
user www-data; | ||
daemon off; | ||
worker_processes 1; | ||
|
||
pid /tmp/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
gzip on; | ||
|
||
server { | ||
listen 80; | ||
root /var/www/html; | ||
index index.php index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[supervisord] | ||
nodaemon=true | ||
logfile=/dev/stderr | ||
logfile_maxbytes=0 | ||
pidfile=/tmp/supervisord.pid | ||
|
||
[program:php-fpm] | ||
command=/usr/local/sbin/php-fpm | ||
redirect_stderr=true | ||
stdout_logfile=/dev/stderr | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
|
||
[program:nginx] | ||
command=/usr/sbin/nginx | ||
redirect_stderr=true | ||
stdout_logfile=/dev/stderr | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.