@echo "----------------------"
@echo "Check file permissions"
@echo "----------------------"
- @for file in `git ls-files`; do \
+ @for file in `git ls-files | grep -v docker`; do \
if [ -x $$file ]; then \
errors=true; \
echo "$${file} is executable"; \
--- /dev/null
+FROM alpine:3.6
+MAINTAINER Shaarli Community
+
+RUN apk --update --no-cache add \
+ ca-certificates \
+ curl \
+ nginx \
+ php7 \
+ php7-ctype \
+ php7-curl \
+ php7-fpm \
+ php7-gd \
+ php7-iconv \
+ php7-intl \
+ php7-json \
+ php7-mbstring \
+ php7-openssl \
+ php7-phar \
+ php7-session \
+ php7-xml \
+ php7-zlib \
+ s6
+
+COPY nginx.conf /etc/nginx/nginx.conf
+COPY php-fpm.conf /etc/php7/php-fpm.conf
+COPY services.d /etc/services.d
+
+RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \
+ && rm -rf /etc/php7/php-fpm.d/www.conf \
+ && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
+ && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
+
+
+WORKDIR /var/www
+RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \
+ && mv Shaarli-master shaarli \
+ && cd shaarli \
+ && composer --prefer-dist --no-dev install \
+ && rm -rf ~/.composer \
+ && chown -R nginx:nginx .
+
+VOLUME /var/www/shaarli/data
+
+EXPOSE 80
+
+ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
+CMD []
-user www-data www-data;
+user nginx nginx;
daemon off;
worker_processes 4;
+pid /var/run/nginx.pid;
events {
worker_connections 768;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# filter and proxy PHP requests to PHP-FPM
- fastcgi_pass unix:/var/run/php5-fpm.sock;
+ fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
--- /dev/null
+[global]
+daemonize = no
+
+[www]
+user = nginx
+group = nginx
+listen.owner = nginx
+listen.group = nginx
+catch_workers_output = yes
+listen = /var/run/php-fpm.sock
+pm = dynamic
+pm.max_children = 20
+pm.start_servers = 1
+pm.min_spare_servers = 1
+pm.max_spare_servers = 3
+pm.max_requests = 2048
--- /dev/null
+#!/bin/sh
+/bin/true
--- /dev/null
+#!/bin/execlineb -P
+nginx
--- /dev/null
+#!/bin/execlineb -P
+php-fpm7 -F
+++ /dev/null
-FROM debian:jessie
-MAINTAINER Shaarli Community
-
-ENV TERM dumb
-RUN apt-get update \
- && apt-get install --no-install-recommends -y \
- ca-certificates \
- curl \
- nginx-light \
- php5-curl \
- php5-fpm \
- php5-gd \
- php5-intl \
- supervisor \
- && apt-get clean
-
-RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
-RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
-COPY nginx.conf /etc/nginx/nginx.conf
-COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
-
-ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
-RUN chmod 755 /usr/local/bin/composer
-
-WORKDIR /var/www
-RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \
- && mv Shaarli-master shaarli \
- && cd shaarli \
- && composer --prefer-dist --no-dev install
-RUN rm -rf html \
- && chown -R www-data:www-data .
-
-VOLUME /var/www/shaarli/data
-
-EXPOSE 80
-
-CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
+++ /dev/null
-[program:php5-fpm]
-command=/usr/sbin/php5-fpm -F
-priority=5
-autostart=true
-autorestart=true
-
-[program:nginx]
-command=/usr/sbin/nginx
-priority=10
-autostart=true
-autorestart=true
-stdout_events_enabled=true
-stderr_events_enabled=true