+ ADD standard heroku php project
This commit is contained in:
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.php]
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/vendor/
|
||||
1
Procfile
Normal file
1
Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: heroku-php-nginx -i ${PHP_INI-config/php.ini} -C ${NGINX_CONF-config/nginx.conf} ${WEBROOT-web}
|
||||
29
composer.json
Normal file
29
composer.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "felegy/test",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=7.4 <8.4",
|
||||
"ext-gd": "*",
|
||||
"ext-redis": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-soap": "*",
|
||||
"ext-exif": "*",
|
||||
"ext-imagick": "*",
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"heroku/heroku-buildpack-php": "*"
|
||||
},
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Felegy\\Test\\": "web/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "felegy",
|
||||
"email": "felegy@hvg.hu"
|
||||
}
|
||||
]
|
||||
}
|
||||
73
composer.lock
generated
Normal file
73
composer.lock
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "dc6d465ed02db34e2d110dfb57b6f81f",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "heroku/heroku-buildpack-php",
|
||||
"version": "v271",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/heroku/heroku-buildpack-php.git",
|
||||
"reference": "ef47055d9630c842536b876b04325c337b51fd2c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/ef47055d9630c842536b876b04325c337b51fd2c",
|
||||
"reference": "ef47055d9630c842536b876b04325c337b51fd2c",
|
||||
"shasum": ""
|
||||
},
|
||||
"bin": [
|
||||
"bin/heroku-php-apache2",
|
||||
"bin/heroku-php-nginx"
|
||||
],
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Zuelke",
|
||||
"email": "dz@heroku.com"
|
||||
}
|
||||
],
|
||||
"description": "Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku",
|
||||
"homepage": "https://github.com/heroku/heroku-buildpack-php",
|
||||
"keywords": [
|
||||
"apache",
|
||||
"apache2",
|
||||
"foreman",
|
||||
"heroku",
|
||||
"nginx",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/heroku/heroku-buildpack-php/issues",
|
||||
"source": "https://github.com/heroku/heroku-buildpack-php/tree/v271"
|
||||
},
|
||||
"time": "2025-07-31T20:24:02+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=7.4 <8.4",
|
||||
"ext-gd": "*",
|
||||
"ext-redis": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-soap": "*",
|
||||
"ext-exif": "*",
|
||||
"ext-imagick": "*",
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
47
config/nginx.conf
Normal file
47
config/nginx.conf
Normal file
@@ -0,0 +1,47 @@
|
||||
server_tokens off;
|
||||
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header Referrer-Policy "same-origin";
|
||||
add_header Feature-Policy "geolocation none;";
|
||||
add_header Content-Security-Policy upgrade-insecure-requests;
|
||||
|
||||
index index.php index.html;
|
||||
charset UTF-8;
|
||||
default_type text/html;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_min_length 10;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/png image/gif image/jpeg;
|
||||
|
||||
client_max_body_size 64M;
|
||||
|
||||
# Force HTTPS on Heroku
|
||||
if ($http_x_forwarded_proto = "http") {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to rewrite
|
||||
try_files $uri @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
# rewrite all to app.php
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
location ~ ^/(app|app_dev|config)\.php(/|$) {
|
||||
try_files @heroku-fcgi @heroku-fcgi;
|
||||
# ensure that /app.php isn't accessible directly, but only through a rewrite
|
||||
internal;
|
||||
}
|
||||
0
config/php.ini
Normal file
0
config/php.ini
Normal file
17
project.toml
Normal file
17
project.toml
Normal file
@@ -0,0 +1,17 @@
|
||||
[_]
|
||||
schema-version = "0.2"
|
||||
|
||||
[_.metadata]
|
||||
org.opencontainers.image.source = "https://git.saito.systems/felegy/test"
|
||||
org.opencontainers.image.description= "Test PHP cnb image"
|
||||
|
||||
[io.buildpacks]
|
||||
builder = "heroku/builder:24"
|
||||
include = [
|
||||
".profile.d",
|
||||
"Procfile",
|
||||
"config",
|
||||
"web",
|
||||
"composer.json",
|
||||
"composer.lock"
|
||||
]
|
||||
5
web/app.php
Normal file
5
web/app.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
echo "<h1 align=\"center\" >Welcome kpack CNB PHP test image</h1>";
|
||||
|
||||
require_once dirname(__FILE__).'/app/info.php';
|
||||
8
web/app/info.php
Normal file
8
web/app/info.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
// Show all information, defaults to INFO_ALL
|
||||
phpinfo();
|
||||
|
||||
// Show just the module information.
|
||||
// phpinfo(8) yields identical results.
|
||||
phpinfo(INFO_MODULES);
|
||||
Reference in New Issue
Block a user