Deprecated old Nginx stuff
This commit is contained in:
parent
a8c2363087
commit
99d5794f14
185
Dockerfile.nginx
185
Dockerfile.nginx
|
@ -1,185 +0,0 @@
|
|||
FROM ubuntu:18.04 AS builder
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
ARG TESTING=false
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_VERSION=7.4 \
|
||||
PHP_REDIS_VERSION=5.2.1
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests ca-certificates software-properties-common wget git openssl && \
|
||||
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests make php$PHP_VERSION php$PHP_VERSION-dev zip unzip php$PHP_VERSION-zip && \
|
||||
# Redis Extension
|
||||
wget -q https://github.com/phpredis/phpredis/archive/$PHP_REDIS_VERSION.tar.gz && \
|
||||
tar -xf $PHP_REDIS_VERSION.tar.gz && \
|
||||
cd phpredis-$PHP_REDIS_VERSION && \
|
||||
phpize$PHP_VERSION && \
|
||||
./configure && \
|
||||
make && \
|
||||
# Composer
|
||||
wget https://getcomposer.org/composer.phar && \
|
||||
chmod +x ./composer.phar && \
|
||||
mv ./composer.phar /usr/bin/composer && \
|
||||
#Brotli
|
||||
cd / && \
|
||||
git clone https://github.com/eustas/ngx_brotli.git && \
|
||||
cd ngx_brotli && git submodule update --init && cd ..
|
||||
|
||||
WORKDIR /usr/local/src/
|
||||
|
||||
# Updating PHP Dependencies and Auto-loading...
|
||||
|
||||
ENV TESTING=$TESTING
|
||||
|
||||
COPY composer.* /usr/local/src/
|
||||
|
||||
RUN composer update --ignore-platform-reqs --optimize-autoloader \
|
||||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM ubuntu:18.04
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
ARG VERSION=dev
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_VERSION=7.4 \
|
||||
_APP_SERVER=nginx \
|
||||
_APP_ENV=production \
|
||||
_APP_DOMAIN=localhost \
|
||||
_APP_DOMAIN_TARGET=localhost \
|
||||
_APP_HOME=https://appwrite.io \
|
||||
_APP_EDITION=community \
|
||||
_APP_OPTIONS_ABUSE=enabled \
|
||||
_APP_OPTIONS_FORCE_HTTPS=disabled \
|
||||
_APP_OPENSSL_KEY_V1=your-secret-key \
|
||||
_APP_STORAGE_LIMIT=10000000 \
|
||||
_APP_STORAGE_ANTIVIRUS=enabled \
|
||||
_APP_REDIS_HOST=redis \
|
||||
_APP_REDIS_PORT=6379 \
|
||||
_APP_DB_HOST=mariadb \
|
||||
_APP_DB_PORT=3306 \
|
||||
_APP_DB_USER=root \
|
||||
_APP_DB_PASS=password \
|
||||
_APP_DB_SCHEMA=appwrite \
|
||||
_APP_INFLUXDB_HOST=influxdb \
|
||||
_APP_INFLUXDB_PORT=8086 \
|
||||
_APP_STATSD_HOST=telegraf \
|
||||
_APP_STATSD_PORT=8125 \
|
||||
_APP_SMTP_HOST=smtp \
|
||||
_APP_SMTP_PORT=25 \
|
||||
_APP_SETUP=self-hosted \
|
||||
_APP_VERSION=$VERSION
|
||||
#ENV _APP_SMTP_SECURE ''
|
||||
#ENV _APP_SMTP_USERNAME ''
|
||||
#ENV _APP_SMTP_PASSWORD ''
|
||||
|
||||
COPY --from=builder /phpredis-5.2.1/modules/redis.so /usr/lib/php/20190902/
|
||||
COPY --from=builder /phpredis-5.2.1/modules/redis.so /usr/lib/php/20190902/
|
||||
COPY --from=builder /ngx_brotli /ngx_brotli
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests wget ca-certificates software-properties-common build-essential libpcre3-dev zlib1g-dev libssl-dev openssl gnupg htop supervisor && \
|
||||
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && \
|
||||
add-apt-repository universe && \
|
||||
add-apt-repository ppa:certbot/certbot && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests php$PHP_VERSION php$PHP_VERSION-fpm \
|
||||
php$PHP_VERSION-mysqlnd php$PHP_VERSION-curl php$PHP_VERSION-imagick php$PHP_VERSION-mbstring php$PHP_VERSION-dom certbot && \
|
||||
# Nginx
|
||||
wget http://nginx.org/download/nginx-1.19.0.tar.gz && \
|
||||
tar -xzvf nginx-1.19.0.tar.gz && rm nginx-1.19.0.tar.gz && \
|
||||
cd nginx-1.19.0 && \
|
||||
./configure --prefix=/usr/share/nginx \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--modules-path=/usr/lib/nginx/modules \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--pid-path=/run/nginx.pid \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--user=www-data \
|
||||
--group=www-data \
|
||||
--build=Ubuntu \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--add-module=/ngx_brotli && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf ../nginx-1.19.0 && \
|
||||
# Redis Extension
|
||||
echo extension=redis.so >> /etc/php/$PHP_VERSION/fpm/conf.d/redis.ini && \
|
||||
echo extension=redis.so >> /etc/php/$PHP_VERSION/cli/conf.d/redis.ini && \
|
||||
# Cleanup
|
||||
cd ../ && \
|
||||
apt-get purge -y --auto-remove wget software-properties-common build-essential libpcre3-dev zlib1g-dev libssl-dev gnupg && \
|
||||
apt-get clean && \
|
||||
rm -rf /ngx_brotli && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set Upload Limit (default to 100MB)
|
||||
RUN echo "upload_max_filesize = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "post_max_size = ${_APP_STORAGE_LIMIT}" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.preload_user=www-data" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
RUN echo "opcache.enable_cli = 1" >> /etc/php/$PHP_VERSION/fpm/conf.d/appwrite.ini
|
||||
|
||||
# Add logs file
|
||||
RUN echo "" >> /var/log/appwrite.log
|
||||
|
||||
# Nginx Configuration (with self-signed ssl certificates)
|
||||
COPY ./docker/nginx.conf.template /etc/nginx/nginx.conf.template
|
||||
COPY ./docker/ssl/cert.pem /etc/nginx/ssl/cert.pem
|
||||
COPY ./docker/ssl/key.pem /etc/nginx/ssl/key.pem
|
||||
|
||||
# PHP Configuration
|
||||
RUN mkdir -p /var/run/php
|
||||
COPY ./docker/www.conf /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
|
||||
# Add PHP Source Code
|
||||
COPY ./app /usr/src/code/app
|
||||
COPY ./bin /usr/local/bin
|
||||
COPY ./docs /usr/src/code/docs
|
||||
COPY ./public /usr/src/code/public
|
||||
COPY ./src /usr/src/code/src
|
||||
COPY --from=builder /usr/local/src/vendor /usr/src/code/vendor
|
||||
|
||||
RUN mkdir -p /storage/uploads && \
|
||||
mkdir -p /storage/cache && \
|
||||
mkdir -p /storage/config && \
|
||||
mkdir -p /storage/certificates && \
|
||||
mkdir -p /storage/functions && \
|
||||
chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads && \
|
||||
chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache && \
|
||||
chown -Rf www-data.www-data /storage/config && chmod -Rf 0755 /storage/config && \
|
||||
chown -Rf www-data.www-data /storage/certificates && chmod -Rf 0755 /storage/certificates && \
|
||||
chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions
|
||||
|
||||
# Supervisord Conf
|
||||
COPY ./docker/supervisord.conf /etc/supervisord.conf
|
||||
|
||||
# Executables
|
||||
RUN chmod +x /usr/local/bin/start
|
||||
RUN chmod +x /usr/local/bin/doctor
|
||||
RUN chmod +x /usr/local/bin/migrate
|
||||
RUN chmod +x /usr/local/bin/test
|
||||
|
||||
# Letsencrypt Permissions
|
||||
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /usr/src/code
|
||||
|
||||
CMD ["/bin/bash", "/usr/local/bin/start"]
|
|
@ -287,10 +287,6 @@ App::get('/v1/health/stats') // Currently only used internally
|
|||
|
||||
$response
|
||||
->json([
|
||||
'server' => [
|
||||
'name' => 'nginx',
|
||||
'version' => \shell_exec('nginx -v 2>&1'),
|
||||
],
|
||||
'storage' => [
|
||||
'used' => Storage::human($device->getDirectorySize($device->getRoot().'/')),
|
||||
'partitionTotal' => Storage::human($device->getPartitionTotalSpace()),
|
||||
|
|
37
bin/start
37
bin/start
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export PHP_VERSION=$PHP_VERSION
|
||||
|
||||
chown -Rf www-data.www-data /usr/src/code/
|
||||
|
||||
sed 's/%_APP_STORAGE_LIMIT%/'$_APP_STORAGE_LIMIT'/g' /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
# Function to update the fpm configuration to make the service environment variables available
|
||||
function setEnvironmentVariable() {
|
||||
if [ -z "$2" ]; then
|
||||
echo "Environment variable '$1' not set."
|
||||
return
|
||||
fi
|
||||
|
||||
# Check whether variable already exists
|
||||
if ! grep -q "\[$1\]" /etc/php/$PHP_VERSION/fpm/pool.d/www.conf; then
|
||||
# Add variable
|
||||
echo "env[$1] = $2" >> /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
fi
|
||||
|
||||
# Reset variable
|
||||
# sed -i "s/^env\[$1.*/env[$1] = $2/g" /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
|
||||
}
|
||||
|
||||
# Grep for variables that look like MySQL (APP_)
|
||||
for _curVar in $(env | grep _APP_ | awk -F = '{print $1}');do
|
||||
# awk has split them by the equals sign
|
||||
# Pass the name and value to our function
|
||||
setEnvironmentVariable ${_curVar} ${!_curVar}
|
||||
done
|
||||
|
||||
# Init server settings
|
||||
php /usr/src/code/app/tasks/init.php ssl
|
||||
|
||||
# Start supervisord and services
|
||||
/usr/bin/supervisord -n -c /etc/supervisord.conf
|
|
@ -1,215 +0,0 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.2
|
||||
container_name: appwrite-traefik
|
||||
command:
|
||||
- --log.level=DEBUG
|
||||
- --api.insecure=true
|
||||
- --providers.file.directory=/storage/config
|
||||
- --providers.file.watch=true
|
||||
- --providers.docker=true
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- --accesslog=true
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- appwrite-config:/storage/config:ro
|
||||
- appwrite-certificates:/storage/certificates:ro
|
||||
depends_on:
|
||||
- appwrite
|
||||
networks:
|
||||
- gateway
|
||||
- appwrite
|
||||
|
||||
appwrite:
|
||||
container_name: appwrite
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- TESTING=true
|
||||
- VERSION=dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
labels:
|
||||
- traefik.http.routers.appwrite.rule=PathPrefix(`/`)
|
||||
- traefik.http.routers.appwrite-secure.rule=PathPrefix(`/`)
|
||||
- traefik.http.routers.appwrite-secure.tls=true
|
||||
volumes:
|
||||
- appwrite-uploads:/storage/uploads:rw
|
||||
- appwrite-cache:/storage/cache:rw
|
||||
- appwrite-config:/storage/config:rw
|
||||
- appwrite-certificates:/storage/certificates:rw
|
||||
- appwrite-functions:/storage/functions:rw
|
||||
- ./phpunit.xml:/usr/src/code/phpunit.xml
|
||||
- ./tests:/usr/src/code/tests
|
||||
- ./app:/usr/src/code/app
|
||||
# - ./vendor:/usr/src/code/vendor
|
||||
- ./docs:/usr/src/code/docs
|
||||
- ./public:/usr/src/code/public
|
||||
- ./src:/usr/src/code/src
|
||||
ports:
|
||||
- 9501:80
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
# - smtp
|
||||
- clamav
|
||||
- influxdb
|
||||
- telegraf
|
||||
- maildev
|
||||
environment:
|
||||
#- _APP_ENV=production
|
||||
- _APP_ENV=development
|
||||
- _APP_OPTIONS_ABUSE=disabled
|
||||
- _APP_OPTIONS_FORCE_HTTPS=disabled
|
||||
- _APP_OPENSSL_KEY_V1=your-secret-key
|
||||
- _APP_DOMAIN=demo.appwrite.io
|
||||
- _APP_DOMAIN_TARGET=demo.appwrite.io
|
||||
- _APP_REDIS_HOST=redis
|
||||
- _APP_REDIS_PORT=6379
|
||||
- _APP_DB_HOST=mariadb
|
||||
- _APP_DB_PORT=3306
|
||||
- _APP_DB_SCHEMA=appwrite
|
||||
- _APP_DB_USER=user
|
||||
- _APP_DB_PASS=password
|
||||
- _APP_INFLUXDB_HOST=influxdb
|
||||
- _APP_INFLUXDB_PORT=8086
|
||||
- _APP_STATSD_HOST=telegraf
|
||||
- _APP_STATSD_PORT=8125
|
||||
- _APP_SMTP_HOST=maildev
|
||||
- _APP_SMTP_PORT=25
|
||||
|
||||
mariadb:
|
||||
image: appwrite/mariadb:1.2.0 # fix issues when upgrading using: mysql_upgrade -u root -p
|
||||
container_name: appwrite-mariadb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-mariadb:/var/lib/mysql:rw
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootsecretpassword
|
||||
- MYSQL_DATABASE=appwrite
|
||||
- MYSQL_USER=user
|
||||
- MYSQL_PASSWORD=password
|
||||
command: 'mysqld --innodb-flush-method=fsync'
|
||||
|
||||
maildev:
|
||||
image: djfarrelly/maildev
|
||||
container_name: appwrite-maildev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '1080:80'
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# smtp:
|
||||
# image: appwrite/smtp:1.0.1
|
||||
# container_name: appwrite-smtp
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# environment:
|
||||
# - MAILNAME=appwrite
|
||||
# - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16
|
||||
|
||||
redis:
|
||||
image: redis:5.0
|
||||
container_name: appwrite-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-redis:/data:rw
|
||||
|
||||
clamav:
|
||||
image: appwrite/clamav:1.2.0
|
||||
container_name: appwrite-clamav
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-uploads:/storage/uploads
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.6
|
||||
container_name: appwrite-influxdb
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
volumes:
|
||||
- appwrite-influxdb:/var/lib/influxdb:rw
|
||||
|
||||
telegraf:
|
||||
image: appwrite/telegraf:1.0.0
|
||||
container_name: appwrite-telegraf
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
# redis-commander:
|
||||
# image: rediscommander/redis-commander:latest
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# environment:
|
||||
# - REDIS_HOSTS=redis
|
||||
# ports:
|
||||
# - "8081:8081"
|
||||
|
||||
# resque:
|
||||
# image: registry.gitlab.com/appwrite/appwrite/resque-web:v1.0.2
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# ports:
|
||||
# - "5678:5678"
|
||||
# environment:
|
||||
# - RESQUE_WEB_HOST=redis
|
||||
# - RESQUE_WEB_PORT=6379
|
||||
# - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user
|
||||
# - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password
|
||||
|
||||
# chronograf:
|
||||
# image: chronograf:1.5
|
||||
# container_name: appwrite-chronograf
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - appwrite
|
||||
# volumes:
|
||||
# - appwrite-chronograf:/var/lib/chronograf
|
||||
# ports:
|
||||
# - "8888:8888"
|
||||
# environment:
|
||||
# - INFLUXDB_URL=http://influxdb:8086
|
||||
# - KAPACITOR_URL=http://kapacitor:9092
|
||||
# - AUTH_DURATION=48h
|
||||
# - TOKEN_SECRET=duperduper5674829!jwt
|
||||
# - GH_CLIENT_ID=d86f7145a41eacfc52cc
|
||||
# - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab
|
||||
# - GH_ORGS=appwrite
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
appwrite:
|
||||
|
||||
volumes:
|
||||
appwrite-mariadb:
|
||||
appwrite-redis:
|
||||
appwrite-cache:
|
||||
appwrite-uploads:
|
||||
appwrite-certificates:
|
||||
appwrite-functions:
|
||||
appwrite-influxdb:
|
||||
appwrite-chronograf:
|
||||
appwrite-config:
|
|
@ -1,149 +0,0 @@
|
|||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 2048;
|
||||
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
# Basic Settings
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
client_max_body_size %_APP_STORAGE_LIMIT%;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# SSL Settings
|
||||
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
#ssl_prefer_server_ciphers on;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
# Logging Settings
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# Gzip Settings
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
|
||||
# Brotli Settings
|
||||
brotli on;
|
||||
brotli_comp_level 5;
|
||||
brotli_static on;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
||||
|
||||
# Virtual Host Configs
|
||||
server {
|
||||
listen 80; ## listen for ipv4; this line is default and implied
|
||||
listen [::]:80 ipv6only=on; ## listen for ipv6
|
||||
listen 443 default ssl http2;
|
||||
|
||||
#ssl on;
|
||||
ssl_certificate /etc/nginx/ssl/cert.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/key.pem;
|
||||
|
||||
root /usr/src/code/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
#server_name localhost;
|
||||
|
||||
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
|
||||
sendfile off;
|
||||
|
||||
# Add stdout logging
|
||||
|
||||
#error_log /dev/stdout info;
|
||||
#access_log /dev/stdout;
|
||||
|
||||
access_log off;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to index.html
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
||||
|
||||
}
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:ico|cur|gz|svg|svgz|mp4|ogg|woff|woff2|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# CSS and JavaScript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /images {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /favicon.png {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/src/code;
|
||||
}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
|
||||
fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;
|
||||
fastcgi_read_timeout 600;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
# deny access to . files, for security
|
||||
location ~ /\.(?!well-known).* {
|
||||
#log_not_found off;
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEpDCCAowCCQDLt1wOwov7hTANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls
|
||||
b2NhbGhvc3QwHhcNMTkxMTA5MTgyNDA3WhcNMjAxMTA4MTgyNDA3WjAUMRIwEAYD
|
||||
VQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCp
|
||||
nPP8ck7HKPVorhtIZfxY8Mf+rnhIhenRMzDTmGtq53dhbg4I1kGcy8WZkyh6QaxQ
|
||||
PyrNKZXBAQtELSWGgjL3PnVsKWVtQT2YzBSIhHTXct6RbYpd2yLmK77IOmu0DtWF
|
||||
0QX5TxEB/ryDn92uGxIlKptDxqLrsbN1GhZYkXn0jVp6jIqC32YnxJVItzhSqCns
|
||||
eJrF96XeXZKlN5TmSbpAwbjyZCkCCWi8q5CLpjrhFdud754pmuiJ03xQn9LXhvIx
|
||||
OzQ8jPiINr+cR19sZHiAwOdb028gjL8VYdvAiOiJ85UwPwPBeCpJkS4FVWxDpBhQ
|
||||
XjUGbr5YiACcUNenoEjbSut80VhyAqHVPtEY4WMFclua6vuszGQW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YBmbwV9AcgPtQ5LuCPeAsh+g9pNhaqF/f/ljLA==
|
||||
-----END CERTIFICATE-----
|
|
@ -1,52 +0,0 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCpnPP8ck7HKPVo
|
||||
rhtIZfxY8Mf+rnhIhenRMzDTmGtq53dhbg4I1kGcy8WZkyh6QaxQPyrNKZXBAQtE
|
||||
LSWGgjL3PnVsKWVtQT2YzBSIhHTXct6RbYpd2yLmK77IOmu0DtWF0QX5TxEB/ryD
|
||||
n92uGxIlKptDxqLrsbN1GhZYkXn0jVp6jIqC32YnxJVItzhSqCnseJrF96XeXZKl
|
||||
N5TmSbpAwbjyZCkCCWi8q5CLpjrhFdud754pmuiJ03xQn9LXhvIxOzQ8jPiINr+c
|
||||
R19sZHiAwOdb028gjL8VYdvAiOiJ85UwPwPBeCpJkS4FVWxDpBhQXjUGbr5YiACc
|
||||
UNenoEjbSut80VhyAqHVPtEY4WMFclua6vuszGQW4cyhWLKO2pN2lno0EakXDZT9
|
||||
P53OKB1gFDvpyK3LmD6B4OvddIBCbSYgAotkcojOlcHVDYJUVcN6VgiJQann/QLQ
|
||||
Xcgu8K0CUY4hVvtHV7RlfMc1QcOote5lpUWDpByYWw8TAUHa7MGXVjNu4q//w3SV
|
||||
RW1RyxVjtgOznLvAM+kFZFV3epS9A9zyk0XyxDuqjz8oLQwKhzms/ORaDa7WPlqy
|
||||
J9mkwRWgs+zthFp5fcMJ4onwXqR9Yem4UMsugBEFFn/3kto2ZsAgDZjrVnlWOpee
|
||||
645S3GRtNjpu0LFqIfYeuZmowDgYQQIDAQABAoICADrBq2fldVLa5oDX542h/tQU
|
||||
vUOFzxdYhJI7CIwUfgmvm5R92pDHID2f/Zjg+KG5hGbcKwidgko1AWEhvqElE2DB
|
||||
G05X3NIHSr5W3DoaoJtOKLn6V3eCBUn1F4cnbc4XYXKU4VvnPv4Q798tD09UA2oq
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IqgW3QoUNkAm4Fnf7G4
|
||||
PdhXRAm2NeQ+CSBtmHl7PZHzLlF4RcQnC9DQHy/P+PGfcYfwWNqZyF7pAkwhtFYK
|
||||
zsxekl6PxjZ6DvclwU3jgQ4OiNElcF2Yjhtwh0nryyz+SktJieFKoWUz1F71tONw
|
||||
5TNbiKb1sWKzZvvcvyjUdLuMH/HzfNg5ZxxiJHrD0Zga1jLMzZil+eYhIbUuQT9b
|
||||
IdEYCvfruwoF/SjjPH/aDPu6jZug/iE288Msqm/YGC9uTW1/GLhrpIyWdposa1Jh
|
||||
Fdo3SqBMHZO0uGFt0FSpZNv0jNUJdB0=
|
||||
-----END PRIVATE KEY-----
|
|
@ -1,200 +0,0 @@
|
|||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock ; (the path to the socket file)
|
||||
|
||||
[supervisord]
|
||||
;logfile=/tmp/supervisord.log ; (main log file;default.conf $CWD/supervisord.log)
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0 ; (max main logfile bytes b4 rotation;default.conf 50MB)
|
||||
logfile_backups=10 ; (num of main logfile rotation backups;default.conf 10)
|
||||
loglevel=info ; (log level;default.conf info; others: debug,warn,trace)
|
||||
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default.conf supervisord.pid)
|
||||
nodaemon=false ; (start in foreground if true;default.conf false)
|
||||
minfds=1024 ; (min. avail startup file descriptors;default.conf 1024)
|
||||
minprocs=200 ; (min. avail process descriptors;default.conf 200)
|
||||
user=root ;
|
||||
|
||||
; the below section must remain in the config file for RPC
|
||||
; (supervisorctl/web interface) to work, additional interfaces may be
|
||||
; added by defining them in separate rpcinterface: sections
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||
|
||||
[program:php7-fpm]
|
||||
command=php-fpm%(ENV_PHP_VERSION)s -F
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=5
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:nginx]
|
||||
command=nginx
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-webhooks]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-webhooks',APP_INCLUDE='/usr/src/code/app/workers/webhooks.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-mails]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-mails',APP_INCLUDE='/usr/src/code/app/workers/mails.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-audits]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-audits',APP_INCLUDE='/usr/src/code/app/workers/audits.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-usage]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-usage',APP_INCLUDE='/usr/src/code/app/workers/usage.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-tasks]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-tasks',APP_INCLUDE='/usr/src/code/app/workers/tasks.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-deletes]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-deletes',APP_INCLUDE='/usr/src/code/app/workers/deletes.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-certificates]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-certificates',APP_INCLUDE='/usr/src/code/app/workers/certificates.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-functions]
|
||||
command=php /usr/src/code/vendor/bin/resque
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=QUEUE='v1-functions',APP_INCLUDE='/usr/src/code/app/workers/functions.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stdout_logfile=/var/log/appwrite.log
|
||||
stdout_logfile_maxbytes=5000000
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
||||
|
||||
[program:v1-schedule]
|
||||
command=php /usr/src/code/vendor/bin/resque-scheduler
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
environment=REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s',RESQUE_PHP='/usr/src/code/vendor/autoload.php'
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stopsignal=QUIT
|
||||
startretries=10
|
||||
;stdout_logfile=/dev/stdout
|
||||
;stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes = 0
|
412
docker/www.conf
412
docker/www.conf
|
@ -1,412 +0,0 @@
|
|||
; Start a new pool named 'www'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or /usr) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
|
||||
; specific port;
|
||||
; '[::]:port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
; listen = /var/run/php5-fpm.sock
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
||||
;listen.backlog = 65535
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 127.0.0.1
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 5
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/share/php5/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;ping.path = /ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
;slowlog = log/$pool.log.slow
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
chdir = /
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
;catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
Loading…
Reference in a new issue