├── .dockerignore ├── CODE_OF_CONDUCT.md ├── Dockerfile ├── LICENSE ├── README.md ├── kubernetes ├── configmap.yaml ├── deployment.yaml ├── pvc.yaml └── service.yaml └── supervisord.conf /.dockerignore: -------------------------------------------------------------------------------- 1 | /kubernetes/ 2 | LICENSE 3 | README.md 4 | TODO 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at Galexrt@googlemail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | LABEL maintainer="Alexander Trost " 3 | 4 | RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ 5 | apk upgrade --no-cache && \ 6 | apk --no-cache add \ 7 | tzdata supervisor nginx php7 php7-fpm php7-pear \ 8 | php7-xml php7-redis php7-bcmath \ 9 | php7-pdo php7-pdo_mysql php7-mysqli php7-mbstring php7-gd php7-mcrypt \ 10 | php7-openssl php7-apcu php7-gmagick php7-xsl php7-zip php7-sockets \ 11 | php7-ldap php7-pdo_sqlite php7-iconv php7-json php7-intl php7-memcached \ 12 | php7-oauth php7-imap php7-gmp \ 13 | g++ make autoconf && \ 14 | cp /usr/share/zoneinfo/UTC /etc/localtime && \ 15 | echo "UTC" > /etc/timezone && \ 16 | mkdir -p /run/nginx 17 | 18 | COPY supervisord.conf /etc/supervisord.conf 19 | 20 | ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-nginx-php-fpm 2 | [![](https://images.microbadger.com/badges/image/galexrt/nginx-php-fpm.svg)](https://microbadger.com/images/galexrt/nginx-php-fpm "Get your own image badge on microbadger.com") 3 | 4 | [![Docker Repository on Quay.io](https://quay.io/repository/galexrt/nginx-php-fpm/status "Docker Repository on Quay.io")](https://quay.io/repository/galexrt/nginx-php-fpm) 5 | 6 | Image available from: 7 | * [**Quay.io**](https://quay.io/repository/galexrt/nginx-php-fpm) 8 | * [**Docker Hub**](https://hub.docker.com/r/galexrt/nginx-php-fpm) 9 | 10 | Docker image for running Nginx + PHP-FPM in one container, using supervisor.* 11 | 12 | *Running more than one process in a container isn't recommended, but for the sake of "simplicity" when quickly 13 | wanting to run a PHP application. 14 | 15 | ## Please note that this is currently more of a "concept" and hasn't been tested yet! 16 | 17 | ### Basic usage 18 | ``` 19 | docker run \ 20 | -d \ 21 | -v "__YOUR_ETC_NGINX_DIR__":/etc/nginx:ro \ 22 | -v "__YOUR_WWW_DATA__":/var/www:rw \ 23 | quay.io/galexrt/nginx-php-fpm:latest 24 | ``` 25 | -------------------------------------------------------------------------------- /kubernetes/configmap.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: nginx-conf 6 | data: 7 | nginx.conf: | 8 | user nginx; 9 | worker_processes auto; 10 | pid /run/nginx.pid; 11 | include /etc/nginx/modules-enabled/*.conf; 12 | events { 13 | worker_connections 2048; 14 | # multi_accept on; 15 | } 16 | http { 17 | sendfile on; 18 | tcp_nopush on; 19 | tcp_nodelay on; 20 | keepalive_timeout 60; 21 | types_hash_max_size 2048; 22 | server_tokens off; 23 | server_names_hash_bucket_size 64; 24 | server_name_in_redirect off; 25 | disable_symlinks off; 26 | 27 | include /etc/nginx/mime.types; 28 | default_type application/octet-stream; 29 | 30 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE 31 | ssl_prefer_server_ciphers on; 32 | 33 | access_log /var/log/nginx/access.log; 34 | error_log /var/log/nginx/error.log; 35 | 36 | client_max_body_size 101m; 37 | 38 | gzip on; 39 | gzip_disable "msie6"; 40 | gzip_vary on; 41 | gzip_proxied any; 42 | gzip_comp_level 7; 43 | gzip_buffers 16 8k; 44 | gzip_http_version 1.1; 45 | gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 46 | 47 | include /etc/nginx/conf.d/*.conf; 48 | } 49 | --- 50 | apiVersion: v1 51 | kind: ConfigMap 52 | metadata: 53 | name: nginx-sites-conf 54 | data: 55 | default.conf: | 56 | server { 57 | # Listen and server name 58 | server_name _; 59 | listen 80 http2; 60 | listen [::]:80 http2; 61 | 62 | root /var/www/example.com/www/public_html; 63 | index index.php index.html index.htm; 64 | charset utf-8; 65 | error_page 404 /404.html; 66 | 67 | location / { 68 | try_files $uri $uri/ =404; 69 | } 70 | location = /favicon.ico { 71 | access_log off; 72 | log_not_found off; 73 | } 74 | location = /robots.txt { 75 | access_log off; 76 | log_not_found off; 77 | } 78 | location ~ \.php$ { 79 | include fastcgi_params; 80 | fastcgi_pass php-fpm:9000; 81 | 82 | # regex to split $uri to $fastcgi_script_name and $fastcgi_path 83 | fastcgi_split_path_info ^(.+\.php)(.*)$; 84 | 85 | # Check that the PHP script exists before passing it 86 | try_files $fastcgi_script_name =404; 87 | 88 | fastcgi_intercept_errors on; 89 | # Bypass the fact that try_files resets $fastcgi_path_info 90 | # see: http://trac.nginx.org/nginx/ticket/321 91 | set $path_info $fastcgi_path_info; 92 | fastcgi_param PATH_INFO $path_info; 93 | 94 | fastcgi_index index.php; 95 | } 96 | location ~ /\.ht { 97 | deny all; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /kubernetes/deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Deployment 3 | apiVersion: extensions/v1beta1 4 | metadata: 5 | labels: 6 | app: nginx 7 | name: nginx 8 | spec: 9 | replicas: 1 10 | template: 11 | metadata: 12 | name: nginx 13 | labels: 14 | app: nginx 15 | spec: 16 | volumes: 17 | - name: nginx-sites-conf 18 | configMap: 19 | name: nginx-sites-conf 20 | - name: nginx-confd 21 | configMap: 22 | name: nginx-confd 23 | - name: www-data 24 | persistentVolumeClaim: 25 | claimName: www-data-pv-claim 26 | containers: 27 | - name: nginx 28 | image: quay.io/galexrt/nginx-php-fpm:latest 29 | imagePullPolicy: Always 30 | ports: 31 | - containerPort: 80 32 | - containerPort: 443 33 | volumeMounts: 34 | - name: nginx-conf 35 | mountPath: /etc/nginx 36 | - name: nginx-confd 37 | mountPath: /etc/nginx/conf.d/ 38 | - name: www-data 39 | mountPath: /var/www 40 | resources: 41 | requests: 42 | memory: "200Mi" 43 | cpu: "250m" 44 | limits: 45 | memory: "500Mi" 46 | cpu: "400m" 47 | -------------------------------------------------------------------------------- /kubernetes/pvc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: PersistentVolumeClaim 4 | metadata: 5 | name: www-data-pv-claim 6 | labels: 7 | app: nginx 8 | spec: 9 | accessModes: 10 | - ReadWriteMany 11 | resources: 12 | requests: 13 | storage: 10Gi 14 | -------------------------------------------------------------------------------- /kubernetes/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | labels: 6 | app: nginx 7 | name: nginx 8 | spec: 9 | ports: 10 | - name: http 11 | port: 80 12 | protocol: TCP 13 | targetPort: 80 14 | - name: https 15 | port: 443 16 | protocol: TCP 17 | targetPort: 443 18 | selector: 19 | app: nginx 20 | type: ClusterIP 21 | -------------------------------------------------------------------------------- /supervisord.conf: -------------------------------------------------------------------------------- 1 | ; Sample supervisor config file. 2 | 3 | [unix_http_server] 4 | file=/run/supervisord.sock ; (the path to the socket file) 5 | ;chmod=0700 ; socked file mode (default 0700) 6 | ;chown=nobody:nogroup ; socket file uid:gid owner 7 | ;username=user ; (default is no username (open server)) 8 | ;password=123 ; (default is no password (open server)) 9 | 10 | [inet_http_server] ; inet (TCP) server disabled by default 11 | port=0.0.0.0:9001 ; (ip_address:port specifier, *:port for all iface) 12 | ;username=user ; (default is no username (open server)) 13 | ;password=123 ; (default is no password (open server)) 14 | 15 | [supervisord] 16 | logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) 17 | ;logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) 18 | ;logfile_backups=10 ; (num of main logfile rotation backups;default 10) 19 | loglevel=info ; (log level;default info; others: debug,warn,trace) 20 | ;pidfile=/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) 21 | ;nodaemon=false ; (start in foreground if true;default false) 22 | ;minfds=1024 ; (min. avail startup file descriptors;default 1024) 23 | ;minprocs=200 ; (min. avail process descriptors;default 200) 24 | ;umask=022 ; (process file creation umask;default 022) 25 | ;user=chrism ; (default is current user, required if root) 26 | ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') 27 | ;directory=/tmp ; (default is not to cd during start) 28 | ;nocleanup=true ; (don't clean up tempfiles at start;default false) 29 | ;childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) 30 | ;environment=KEY=value ; (key value pairs to add to environment) 31 | ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) 32 | 33 | ; the below section must remain in the config file for RPC 34 | ; (supervisorctl/web interface) to work, additional interfaces may be 35 | ; added by defining them in separate rpcinterface: sections 36 | [rpcinterface:supervisor] 37 | ; Sample supervisor config file. 38 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 39 | 40 | [supervisorctl] 41 | serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix socket 42 | ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket 43 | ;username=chris ; should be same as http_username if set 44 | ;password=123 ; should be same as http_password if set 45 | ;prompt=mysupervisor ; cmd line prompt (default "supervisor") 46 | ;history_file=~/.sc_history ; use readline history if available 47 | 48 | [supervisord] 49 | logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) 50 | logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) 51 | logfile_backups=10 ; (num of main logfile rotation backups;default 10) 52 | loglevel=info ; (log level;default info; others: debug,warn,trace) 53 | pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) 54 | nodaemon=false ; (start in foreground if true;default false) 55 | minfds=1024 ; (min. avail startup file descriptors;default 1024) 56 | minprocs=200 ; (min. avail process descriptors;default 200) 57 | user=root 58 | 59 | ; the below section must remain in the config file for RPC 60 | ; (supervisorctl/web interface) to work, additional interfaces may be 61 | ; added by defining them in separate rpcinterface: sections 62 | [rpcinterface:supervisor] 63 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 64 | 65 | [supervisorctl] 66 | serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket 67 | 68 | [program:php-fpm] 69 | command=/usr/sbin/php-fpm7 -F 70 | autostart=true 71 | autorestart=true 72 | priority=5 73 | stdout_events_enabled=true 74 | stderr_events_enabled=true 75 | 76 | [program:nginx] 77 | command=/usr/sbin/nginx -g 'daemon off;' 78 | autostart=true 79 | autorestart=true 80 | priority=10 81 | stdout_events_enabled=true 82 | stderr_events_enabled=true 83 | 84 | [include] 85 | files = /etc/supervisor/conf.d/*.conf 86 | --------------------------------------------------------------------------------