mirror of
https://github.com/Nathanwoodburn/hnschat-web.git
synced 2025-01-18 19:58:12 +11:00
feat: Update nixpacks config
This commit is contained in:
parent
0dc416d352
commit
80c6ba621e
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"providers": [],
|
"providers": ["php"],
|
||||||
"buildImage": "ghcr.io/railwayapp/nixpacks:ubuntu-1731369831",
|
"buildImage": "ghcr.io/railwayapp/nixpacks:ubuntu-1731369831",
|
||||||
"variables": {
|
"variables": {
|
||||||
"NIXPACKS_METADATA": "php",
|
"NIXPACKS_METADATA": "php",
|
||||||
"PORT": "80"
|
"PORT": "80"
|
||||||
},
|
},
|
||||||
"staticAssets": {
|
"staticAssets": {
|
||||||
"apache.template.conf": "<VirtualHost *:${PORT}>\n ServerName localhost\n DocumentRoot \"${NIXPACKS_PHP_ROOT_DIR:-/app}\"\n\n <Directory \"${NIXPACKS_PHP_ROOT_DIR:-/app}\">\n Options Indexes FollowSymLinks\n AllowOverride All\n Require all granted\n </Directory>\n\n <FilesMatch \\.php$>\n SetHandler \"proxy:fcgi://127.0.0.1:9000\"\n </FilesMatch>\n\n ErrorLog /dev/stdout\n CustomLog /dev/stdout combined\n\n Header always set X-Frame-Options \"SAMEORIGIN\"\n Header always set X-Content-Type-Options \"nosniff\"\n\n RewriteEngine On\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteRule ^ index.php [QSA,L]\n\n <FilesMatch \"^\\.(?!well-known).*\">\n Require all denied\n </FilesMatch>\n</VirtualHost>",
|
"apache.template.conf": "<VirtualHost *:${PORT}>\n ServerName localhost\n DocumentRoot \"${NIXPACKS_PHP_ROOT_DIR:-/app}\"\n\n <Directory \"${NIXPACKS_PHP_ROOT_DIR:-/app}\">\n Options Indexes +FollowSymLinks +MultiViews\n AllowOverride All\n Require all granted\n </Directory>\n\n <FilesMatch \\.php$>\n SetHandler \"proxy:fcgi://127.0.0.1:9000\"\n </FilesMatch>\n\n ServerTokens Prod\n ServerSignature Off\n\n DirectoryIndex index.php\n AddType text/html php\n AddType application/x-httpd-php .php\n\n ErrorLog /dev/stdout\n CustomLog /dev/stdout combined\n\n Header always set X-Frame-Options \"SAMEORIGIN\"\n Header always set X-Content-Type-Options \"nosniff\"\n\n RewriteEngine On\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteRule ^ index.php [QSA,L]\n\n <FilesMatch \"^\\\\.(?!well-known).*\">\n Require all denied\n </FilesMatch>\n</VirtualHost>\n",
|
||||||
"php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\ncatch_workers_output = yes\n",
|
"php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\ncatch_workers_output = yes\n",
|
||||||
"scripts/config/template.mjs": "import { readFile, writeFile } from \"fs/promises\";\nimport { getNixPath } from \"../util/nix.mjs\";\n\nconst replaceStr = input =>\n input\n .replaceAll(/\\${(\\w+)}/g,\n (_all, name) => process.env[name]\n )\n .replaceAll(/\\$!{(\\w+)}/g,\n (_all, exe) => getNixPath(exe)\n )\n\nexport async function compileTemplate(infile, outfile) {\n await writeFile(outfile,\n replaceStr(await readFile(infile, { encoding: 'utf8' })),\n { encoding: 'utf8' })\n}\n",
|
"scripts/config/template.mjs": "import { readFile, writeFile } from \"fs/promises\";\nimport { getNixPath } from \"../util/nix.mjs\";\n\nconst replaceStr = input =>\n input\n .replaceAll(/\\${(\\w+)}/g,\n (_all, name) => process.env[name]\n )\n .replaceAll(/\\$!{(\\w+)}/g,\n (_all, exe) => getNixPath(exe)\n )\n\nexport async function compileTemplate(infile, outfile) {\n await writeFile(outfile,\n replaceStr(await readFile(infile, { encoding: 'utf8' })),\n { encoding: 'utf8' })\n}\n",
|
||||||
"scripts/prestart.mjs": "#!/usr/bin/env node\nimport { compileTemplate } from \"./config/template.mjs\";\nimport { e } from \"./util/cmd.mjs\";\n\nif (process.argv.length != 4) {\n console.error(`Usage: ${process.argv[1]} <config-file> <output-file>`);\n process.exit(1);\n}\n\nawait compileTemplate(process.argv[2], process.argv[3]);\nconsole.log(`Server starting on port ${process.env.PORT}`);\n",
|
"scripts/prestart.mjs": "#!/usr/bin/env node\nimport { compileTemplate } from \"./config/template.mjs\";\nimport { e } from \"./util/cmd.mjs\";\n\nif (process.argv.length != 4) {\n console.error(`Usage: ${process.argv[1]} <config-file> <output-file>`);\n process.exit(1);\n}\n\nawait compileTemplate(process.argv[2], process.argv[3]);\nconsole.log(`Server starting on port ${process.env.PORT}`);\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user