]> git.nbdom.net Git - nb.git/commitdiff
docker.sh, php.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 19 Nov 2016 16:32:36 +0000 (16:32 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 19 Nov 2016 16:32:36 +0000 (16:32 +0000)
etc/profile.d/php.sh
src/Docker/nginx/Dockerfile

index da80ba794184d95f94c1ce71bf5d1276680e76d7..ffe296538eb5b14b73a274e5801e863948223613 100644 (file)
@@ -9,3 +9,8 @@ php425() {
 
 which php > /dev/null || return 0
 function php_check() { php --define error_reporting=22519 --define display_errors=1 --define log_errors=1 --define html_errors=0 $@; }
+
+function php_run() {
+  local code="$1"; shift
+  php -f $NB_ROOT/lib/php/db.php -r "require '$NB_ROOT/lib/php/page.php';$code;" $@
+}
index d5d804b5cdeb30b032924420b348575c3c77ed41..4e39274a8ed70733dea53bc638477467e055a2fe 100644 (file)
@@ -1,3 +1,4 @@
 FROM nginx:latest
 COPY ./default.conf /etc/nginx/conf.d/default.conf
+RUN mkdir -p /var/www/html && echo '<html><head>Hi</head><body><h1>Hi</h1></body></html>' > /var/www/html/index.html
 CMD nginx -g 'daemon off;'