mirror of
https://github.com/sbrow/nix.git
synced 2026-02-27 21:31:45 -05:00
feat: Added new shell only config
This commit is contained in:
19
templates/php/Caddyfile
Normal file
19
templates/php/Caddyfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
wp.test {
|
||||||
|
root * .
|
||||||
|
|
||||||
|
encode zstd gzip
|
||||||
|
file_server
|
||||||
|
php_fastcgi 127.0.0.1:9000
|
||||||
|
|
||||||
|
tls internal
|
||||||
|
}
|
||||||
|
|
||||||
|
laravel.test {
|
||||||
|
root * ./public
|
||||||
|
|
||||||
|
encode zstd gzip
|
||||||
|
file_server
|
||||||
|
php_fastcgi 127.0.0.1:9000
|
||||||
|
|
||||||
|
tls internal
|
||||||
|
}
|
||||||
2
templates/php/Procfile
Normal file
2
templates/php/Procfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
web: sudo caddy run
|
||||||
|
php: php-fpm -F -y php-fpm.conf
|
||||||
24
templates/php/flake.nix
Normal file
24
templates/php/flake.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
description = "A basic php setup for local development";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
caddy
|
||||||
|
foreman
|
||||||
|
php80
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
14
templates/php/php-fpm.conf
Normal file
14
templates/php/php-fpm.conf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
;error_log = /proc/self/fd/2
|
||||||
|
error_log = /dev/stderr
|
||||||
|
|
||||||
|
[site]
|
||||||
|
;access.log = /proc/self/fd/2
|
||||||
|
access.log = /dev/stderr
|
||||||
|
listen = 127.0.0.1:9000
|
||||||
|
; Choose how the process manager will control the number of child processes.
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 75
|
||||||
|
pm.start_servers = 10
|
||||||
|
pm.min_spare_servers = 5
|
||||||
|
pm.max_spare_servers = 20
|
||||||
|
pm.process_idle_timeout = 10s
|
||||||
Reference in New Issue
Block a user