]> git.nbdom.net Git - nb.git/commitdiff
dbq
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 30 Nov 2016 09:49:04 +0000 (09:49 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 30 Nov 2016 09:49:04 +0000 (09:49 +0000)
etc/profile.d/php.sh
src/Docker/nginx/Dockerfile
www/dbq/default.css [deleted file]
www/dbq/docker-compose.yaml
www/dbq/etc/nginx/default.conf
www/dbq/index.php [deleted file]

index ffe296538eb5b14b73a274e5801e863948223613..16f96910ca56a6461a3707cf0cf850a3fd721668 100644 (file)
@@ -8,9 +8,11 @@ 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 $@; }
+php_check() {
+  php --define error_reporting=22519 --define display_errors=1 --define log_errors=1 --define html_errors=0 $@;
+}
 
-function php_run() {
+php_run() {
   local code="$1"; shift
   php -f $NB_ROOT/lib/php/db.php -r "require '$NB_ROOT/lib/php/page.php';$code;" $@
 }
index 0460608a0045adaa697e3b41fd9ddb64bc0db473..1de5d89fe7667950328e18237cf11325a0344c18 100644 (file)
@@ -1,4 +1,4 @@
-FROM nginx:latest
+FROM nginx:alpine
 
 ARG WWW_ROOT
 ENV WWW_ROOT=${WWW_ROOT:-/var/www/html}
@@ -12,4 +12,4 @@ RUN test "$WWW_ROOT" && sed -ie 's,^\([\t ]*root \).*$,\1'$WWW_ROOT';,' /etc/ngi
 RUN mkdir -p $WWW_ROOT && echo '<html><head><title>Welcom to Nginx</title></head><body><h1>Welcom to Nginx</h1></body></html>' > $WWW_ROOT/index.html
 
 # Run daemon
-CMD nginx -g 'daemon off;'
+CMD nginx -g 'daemon off; error_log /dev/stdout info;'
diff --git a/www/dbq/default.css b/www/dbq/default.css
deleted file mode 100644 (file)
index 003f2b4..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-html {
-  font: 100% 'Trebuchet MS', sans-serif;
-}
-
-body {
-  display: table;
-  margin-left: auto;
-  margin-right: auto;
-  padding-left: 1em;
-  padding-right: 1em;
-  background-color: #E6E6E6;
-}
-
-h1 {
-  margin: 0 0 0.2em 0;
-}
-
-a,
-body {
-  color: #333333;
-}
-
-ul {
-  padding: 0;
-  margin: 0;
-}
-
-li {
-  list-style:none;
-  padding: 0 0 0 0.3em;
-}
-
-a, a:visited {
-  text-decoration: none;
-}
-
-table { border-collapse: collapse; }
-td, th { padding: 0.2em 0.7em; }
-th { font-size: 0.8em; }
-
-textarea,
-select,
-input:not([type]),
-input[type='text']
-input[type='password']
-input[type='date']
-input[type='email']
-input[type='url']
-input[type=''], {
-  box-shadow: 0 0 5px 0 #eee;
-  border-radius: 4px;
-  border: solid 1px #eee;
-}
-
-form label:after { content: ':'; }
-
-form label,
-form input,
-form select {
-  vertical-align: middle;
-  margin: 0.2em 0.4em 0.2em 0;
-}
-
-table.rows,
-div.rows,
-.menu,
-object, iframe, pre
-{
-  border-collapse: separate;
-  border-spacing: 0;
-  border-radius: 4px;
-  border: solid 1px #fff;
-
-  padding: 0.5em 0.2em;
-  margin-bottom: 0.5em;
-
-}
-
-table.rows th, table.rows td, table.border th, table.border td { border-bottom: solid 1px #fff; }
-table.rows tr:last-child td, table.border tr:last-child td { border-bottom: none; }
-
-.menu, .nav, .rows,
-.center {
-  margin-left: auto;
-  margin-right: auto;
-  display: table;
-}
-
-.menu { padding: 0.5em; }
-
-.button {
-       display: inline-block;
-       text-decoration: none;
-       line-height: 1.5em;
-       margin: 0;
-       cursor: pointer;
-       border-width: 1px;
-       border-style: solid;
-       white-space: nowrap;
-       box-sizing: border-box;
-  color: #ddd;
-  background-color: #3C3C3B;
-  border-color: #3C3C3B;
-  border-radius: 4px;
-}
-
-a:hover,
-.button:hover {
-  opacity: 0.8;
-}
-
-/*
-form a.button:visited, form a.button {
-  display: inline-block;
-  position: relative;
-  top: -1px;
-}
-*/
index e2f27cdb1b7bf2e8dc7994d0bf0ae7a7619de876..ec934e5f13c94eff842854c64c24af5b1be8de5b 100644 (file)
@@ -9,23 +9,15 @@ services:
       NB_ROOT: /opt/nb
     volumes:
       - ./../..:$NB_ROOT
-      - ./:/var/www/html
-      - php
-      #- ./../../lib/php/db:/var/www/html
-    command: "echo . $NB_ROOT/etc/profile > /etc/profile.d/nb.sh"
-
-# NB 29.11.16   php:
-# NB 29.11.16     build: ../Docker/php/
-# NB 29.11.16     expose:
-# NB 29.11.16       - 9000
-# NB 29.11.16     volumes_from:
-# NB 29.11.16       - code
+      - /etc/profile.d
+    entrypoint: sh -c "echo . $NB_ROOT/etc/profile > /etc/profile.d/nb.sh && /usr/local/sbin/php-fpm"
+    #entrypoint: "/usr/local/sbin/php-fpm"
 
   nginx: 
     build:
       context: ../Docker/nginx/
       args:
-        - WWW_ROOT=$NB_ROOT/www/dbq
+        - WWW_ROOT=$NB_ROOT/www/dbq/html
     volumes_from:
       - php
     links:
index ac59a71a71c0f5c4d2b2d4ca868daa5db0abc02a..667824314648613f9807047d8597503621be58bd 100644 (file)
@@ -15,8 +15,8 @@ server {
     #access_log off;
     #error_log  /var/log/nginx/error.log error;
 
-    error_log  /dev/stderr error;
-    access_log  /dev/stdout main;
+    #error_log  /dev/stderr error;
+    #access_log  /dev/stdout main;
     sendfile off;
 
     client_max_body_size 100m;
diff --git a/www/dbq/index.php b/www/dbq/index.php
deleted file mode 100644 (file)
index 7ec1f9e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-require_once($_SERVER['DOCUMENT_ROOT'].'/../../lib/php/page.php');
-Page::pdef('action','ls');
-require_once($_SERVER['DOCUMENT_ROOT'].'/../../lib/php/db/page.php');
-?>