Skip to content

Commit fb4964e

Browse files
committed
status.json and favicon.svg
1 parent 65c4d88 commit fb4964e

File tree

8 files changed

+344
-7
lines changed

8 files changed

+344
-7
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 4
10+
indent_style = tab
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.yaml]
15+
indent_size = 2
16+
indent_style = space
17+
18+
[*.json]
19+
indent_size = 2
20+
indent_style = space

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*~
2+
*.amp.html
3+
.cache
4+
*.class
5+
crash.log
6+
dist/
7+
.DS_Store
8+
*.env
9+
*.gz
10+
.idea/
11+
.jekyll-metadata
12+
node_modules/
13+
*.pyc
14+
.sass-cache/
15+
_site/
16+
tmp/
17+
_tmp/
18+
*.tgz
19+
venv/
20+
.vscode/
21+
*.zip
File renamed without changes.

app.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@ application: regexplanet-php
22
version: 1
33
runtime: php55
44
api_version: 1
5-
5+
env_variables:
6+
COMMIT: dev
7+
LASTMOD: dev
68
handlers:
79
- url: /robots.txt
810
static_files: www/robots.txt
911
upload: www/robots.txt
10-
1112
- url: /favicon.ico
1213
static_files: www/favicon.ico
1314
upload: www/favicon.ico
14-
15+
- url: /favicon.svg
16+
static_files: www/favicon.svg
17+
upload: www/favicon.svg
1518
- url: /status.php
1619
script: www/status.php
17-
20+
- url: /status.json
21+
script: www/status.php
1822
- url: /test.php
1923
script: www/test.php
20-
2124
- url: /
2225
script: www/index.php
23-
2426
- url: /phpinfo.php
2527
script: www/phpinfo.php

deploy-gae.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,22 @@
22
#
33
# deploy php engine to Google AppEngine
44
#
5+
6+
set -o errexit
7+
set -o pipefail
8+
set -o nounset
9+
10+
YAML=./app.yaml
11+
yq write --inplace $YAML env_variables.COMMIT $(git rev-parse --short HEAD)
12+
yq write --inplace $YAML env_variables.LASTMOD $(date -u +%Y-%m-%dT%H:%M:%SZ)
13+
514
/usr/local/google_appengine/appcfg.py --oauth2 update .
615

16+
#
17+
# restore committed values
18+
#
19+
yq write --inplace $YAML env_variables.COMMIT dev
20+
yq write --inplace $YAML env_variables.LASTMOD dev
21+
22+
23+

www/favicon.svg

Lines changed: 271 additions & 0 deletions
Loading

www/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
2-
header("Location: http://www.regexplanet.com/advanced/php/index.html");
2+
header("Location: https://www.regexplanet.com/advanced/php/index.html");
33
exit;
44
?>

www/status.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
2+
date_default_timezone_set('UTC');
23

34
$retVal = array("success" => True);
5+
$retVal["message"] = "OK";
6+
$retVal["timestamp"] = date('c');
7+
$retVal["commit"] = getenv("COMMIT");
8+
$retVal["lastmod"] = getenv("LASTMOD");
9+
$retVal["tech"] = "PHP " . phpversion();
410

511
$retVal["error_get_last()"] = error_get_last();
612
$retVal["error_reporting()"] = error_reporting();

0 commit comments

Comments
 (0)