added Malcolm
This commit is contained in:
		
							
								
								
									
										56
									
								
								Vagrant/resources/malcolm/name-map-ui/config/fpm-pool.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								Vagrant/resources/malcolm/name-map-ui/config/fpm-pool.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| [global] | ||||
| ; Log to /dev/fd/1 for docker | ||||
| error_log = /dev/fd/1 | ||||
|  | ||||
| [www] | ||||
| ; 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 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 = 127.0.0.1:9000 | ||||
|  | ||||
| ; Enable status page | ||||
| pm.status_path = /fpm-status | ||||
|  | ||||
| ; Ondemand process manager | ||||
| pm = ondemand | ||||
|  | ||||
| ; 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 = 100 | ||||
|  | ||||
| ; 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 = 1000 | ||||
|  | ||||
| ; Make sure the FPM workers can reach the environment variables for configuration | ||||
| clear_env = no | ||||
|  | ||||
| ; Catch output from PHP | ||||
| catch_workers_output = yes | ||||
|  | ||||
| ; Remove the 'child 10 said into stderr' prefix in the log and only show the actual message | ||||
| decorate_workers_output = no | ||||
|  | ||||
| ; Enable ping page to use in healthcheck | ||||
| ping.path = /fpm-ping | ||||
							
								
								
									
										92
									
								
								Vagrant/resources/malcolm/name-map-ui/config/nginx.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								Vagrant/resources/malcolm/name-map-ui/config/nginx.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,92 @@ | ||||
| worker_processes 1; | ||||
| error_log stderr warn; | ||||
| pid /tmp/nginx.pid; | ||||
|  | ||||
| events { | ||||
|     worker_connections 1024; | ||||
| } | ||||
|  | ||||
| http { | ||||
|     include mime.types; | ||||
|     default_type application/octet-stream; | ||||
|  | ||||
|     # Define custom log format to include reponse times | ||||
|     log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" ' | ||||
|                           '$status $body_bytes_sent "$http_referer" ' | ||||
|                           '"$http_user_agent" "$http_x_forwarded_for" ' | ||||
|                           '$request_time $upstream_response_time $pipe $upstream_cache_status'; | ||||
|  | ||||
|     access_log /var/log/nginx/access.log main_timed; | ||||
|     error_log /var/log/nginx/error.log notice; | ||||
|  | ||||
|     keepalive_timeout 65; | ||||
|  | ||||
|     # Write temporary files to /tmp so they can be created as a non-privileged user | ||||
|     client_body_temp_path /tmp/client_temp; | ||||
|     proxy_temp_path /tmp/proxy_temp_path; | ||||
|     fastcgi_temp_path /tmp/fastcgi_temp; | ||||
|     uwsgi_temp_path /tmp/uwsgi_temp; | ||||
|     scgi_temp_path /tmp/scgi_temp; | ||||
|  | ||||
|     # Default server definition | ||||
|     server { | ||||
|         listen 8080 default_server; | ||||
|         server_name _; | ||||
|  | ||||
|         sendfile off; | ||||
|  | ||||
|         root /var/www/html; | ||||
|         index index.php index.html; | ||||
|  | ||||
|         location / { | ||||
|             # First attempt to serve request as file, then | ||||
|             # as directory, then fall back to index.php | ||||
|             try_files $uri $uri/ /index.php?q=$uri&$args; | ||||
|         } | ||||
|  | ||||
|         location ~* maps/.+\.(txt|json)$ { | ||||
|           expires -1; | ||||
|           add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | ||||
|         } | ||||
|  | ||||
|         # Redirect server error pages to the static page /50x.html | ||||
|         error_page 500 502 503 504 /50x.html; | ||||
|         location = /50x.html { | ||||
|             root /var/lib/nginx/html; | ||||
|         } | ||||
|  | ||||
|         # Pass the PHP scripts to PHP-FPM listening on 127.0.0.1:9000 | ||||
|         location ~ \.php$ { | ||||
|             try_files $uri =404; | ||||
|             fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
|             fastcgi_pass 127.0.0.1:9000; | ||||
|             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||||
|             fastcgi_param SCRIPT_NAME $fastcgi_script_name; | ||||
|             fastcgi_index index.php; | ||||
|             include fastcgi_params; | ||||
|         } | ||||
|  | ||||
|         location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { | ||||
|             expires 5d; | ||||
|         } | ||||
|  | ||||
|         # Deny access to . files, for security | ||||
|         location ~ /\. { | ||||
|             log_not_found off; | ||||
|             deny all; | ||||
|         } | ||||
|  | ||||
|         # Allow fpm ping and status from localhost | ||||
|         location ~ ^/(fpm-status|fpm-ping)$ { | ||||
|             access_log off; | ||||
|             allow 127.0.0.1; | ||||
|             deny all; | ||||
|             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||||
|             include fastcgi_params; | ||||
|             fastcgi_pass 127.0.0.1:9000; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     # Include other server configs | ||||
|     include /etc/nginx/conf.d/*.conf; | ||||
| } | ||||
							
								
								
									
										7
									
								
								Vagrant/resources/malcolm/name-map-ui/config/php.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Vagrant/resources/malcolm/name-map-ui/config/php.ini
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| [PHP] | ||||
| file_uploads = On | ||||
| upload_max_filesize = 64M | ||||
| max_file_uploads = 4 | ||||
|  | ||||
| [Date] | ||||
| date.timezone="UTC" | ||||
| @@ -0,0 +1,10 @@ | ||||
| ; Copyright (c) 2021 Battelle Energy Alliance, LLC.  All rights reserved. | ||||
|  | ||||
| [supervisord] | ||||
| nodaemon=true | ||||
| logfile=/dev/null | ||||
| logfile_maxbytes=0 | ||||
| pidfile=/tmp/supervisord-logstash.pid | ||||
|  | ||||
| [supervisorctl] | ||||
| serverurl=http://logstash:9001 | ||||
| @@ -0,0 +1,72 @@ | ||||
| ; Copyright (c) 2021 Battelle Energy Alliance, LLC.  All rights reserved. | ||||
|  | ||||
| [unix_http_server] | ||||
| file=/tmp/supervisor-main.sock   ; (the path to the socket file) | ||||
| chmod=0700 | ||||
|  | ||||
| [supervisord] | ||||
| nodaemon=true | ||||
| logfile=/dev/null | ||||
| logfile_maxbytes=0 | ||||
| pidfile=/tmp/supervisor-main.pid | ||||
|  | ||||
| [rpcinterface:supervisor] | ||||
| supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface | ||||
|  | ||||
| [supervisorctl] | ||||
| serverurl=unix:///tmp/supervisor-main.sock | ||||
|  | ||||
| [program:php-fpm] | ||||
| command=/usr/sbin/php-fpm7 -F | ||||
| stopasgroup=true | ||||
| killasgroup=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=true | ||||
| autorestart=false | ||||
| startretries=0 | ||||
|  | ||||
| [program:nginx] | ||||
| command=/usr/sbin/nginx -g 'daemon off;' | ||||
| stopasgroup=true | ||||
| killasgroup=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=true | ||||
| autorestart=false | ||||
| startretries=0 | ||||
|  | ||||
| [program:logaccess] | ||||
| command=/usr/bin/tail -F /var/log/nginx/access.log | ||||
| startsecs=10 | ||||
| startretries=2000000000 | ||||
| stopasgroup=true | ||||
| killasgroup=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| stderr_logfile=/dev/null | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=false | ||||
|  | ||||
| [program:logerrors] | ||||
| command=/usr/bin/tail -F /var/log/nginx/error.log | ||||
| startsecs=10 | ||||
| startretries=2000000000 | ||||
| stopasgroup=true | ||||
| killasgroup=true | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| stderr_logfile=/dev/null | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=false | ||||
|  | ||||
| [program:watch-upload] | ||||
| command=/bin/bash -c "sleep 15 && /usr/local/bin/name-map-save-watch.sh" | ||||
| startsecs=20 | ||||
| startretries=1 | ||||
| stopasgroup=true | ||||
| killasgroup=true | ||||
| directory=/var/www/html/upload | ||||
| stdout_logfile=/dev/fd/1 | ||||
| stdout_logfile_maxbytes=0 | ||||
| redirect_stderr=true | ||||
		Reference in New Issue
	
	Block a user