# !!! MANDATORY !!!
#
if (true or !nb::is_vm()) $DBQ = [
- 'shell' => [
- 'type' => 'sqlite',
- 'name' => 'shell',
- 'default_table' => 'shell_function',
- 'host' => nb::ROOT_DIR.'/share/db/shell.db',
- ],
+# NB 29.11.16 'shell' => [
+# NB 29.11.16 'type' => 'sqlite',
+# NB 29.11.16 'name' => 'shell',
+# NB 29.11.16 'default_table' => 'shell_function',
+# NB 29.11.16 'host' => nb::ROOT_DIR.'/share/db/shell.db',
+# NB 29.11.16 ],
'sys' => [
'type' => 'sqlite',
'name' => 'sys',
- 'default_table' => 'mime',
+ 'default_table' => 'port',
'host' => nb::ROOT_DIR.'/share/db/sys.db',
],
];
.button {
display: inline-block;
text-decoration: none;
+ /*
font-size: 13px;
line-height: 26px;
height: 28px;
- margin: 0;
padding: 0 10px 1px;
+ */
+ line-height: 1.5em;
+ margin: 0;
cursor: pointer;
border-width: 1px;
border-style: solid;
require_once(realpath(dirname(__FILE__).'/functions.php'));
#$nb = new NB(); debug($nb->test());
#if (!defined('NB_PARAMS')) define('NB_PARAMS',$_REQUEST);
+if (class_exists('NB')) return;
-#if (class_exists('NB')) return;
class NB {
const ROOT_DIR = NB_ROOT;
FROM nginx:latest
+
ARG WWW_ROOT
ENV WWW_ROOT=${WWW_ROOT:-/var/www/html}
+
COPY ./default.conf /etc/nginx/conf.d/default.conf
-RUN sed -ie 's,^\([\t ]*root \).*$,\1'$WWW_ROOT';,' /etc/nginx/conf.d/default.conf
+
+# Set DOCUMENT_ROOT
+RUN test "$WWW_ROOT" && sed -ie 's,^\([\t ]*root \).*$,\1'$WWW_ROOT';,' /etc/nginx/conf.d/default.conf
+
+# Create default index.html
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;'
--- /dev/null
+../src/Docker
\ No newline at end of file
+++ /dev/null
-../../lib/css/button.css
\ No newline at end of file
+++ /dev/null
-../../lib/css/db.css
\ No newline at end of file
background-color: #E6E6E6;
}
+h1 {
+ margin: 0 0 0.2em 0;
+}
+
a,
body {
color: #333333;
text-decoration: none;
}
-.button {
- color: #ddd;
- background-color: #3C3C3B;
-}
-
table { border-collapse: collapse; }
td, th { padding: 0.2em 0.7em; }
th { font-size: 0.8em; }
textarea,
+select,
input:not([type]),
-input[type=''],
-input[type='text'] {
+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;
- padding: 0.4em;
- margin-right: 0.3em;
}
-form label:after {
- content: ': ';
-}
+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, .t2d tr
+object, iframe, pre
{
border-collapse: separate;
border-spacing: 0;
- padding: 0.5em 0.2em;
border-radius: 4px;
-
border: solid 1px #fff;
- margin-bottom: 0.5em;
-}
+ 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 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,
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;
+}
+*/
--- /dev/null
+version: '2'
+services:
+ php:
+ #image: php:7.0-fpm-alpine
+ build: ../Docker/php/
+ expose:
+ - 9000
+ environment:
+ 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
+
+ nginx:
+ build:
+ context: ../Docker/nginx/
+ args:
+ - WWW_ROOT=$NB_ROOT/www/dbq
+ volumes_from:
+ - php
+ links:
+ - php
+ ports:
+ - "8080:80"
--- /dev/null
+server {
+ listen 80 default_server;
+ root /var/www/html;
+ index index.html index.php;
+
+ charset utf-8;
+
+ location / {
+ try_files $uri $uri/ /index.php?$query_string;
+ }
+
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location = /robots.txt { access_log off; log_not_found off; }
+
+ #access_log off;
+ #error_log /var/log/nginx/error.log error;
+
+ error_log /dev/stderr error;
+ access_log /dev/stdout main;
+ sendfile off;
+
+ client_max_body_size 100m;
+
+ location ~ \.php$ {
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ fastcgi_pass php:9000;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_intercept_errors off;
+ fastcgi_buffer_size 16k;
+ fastcgi_buffers 4 16k;
+ }
+
+ location ~ /\.ht {
+ deny all;
+ }
+}
<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/../../lib/php/page.php');
+Page::pdef('action','ls');
require_once($_SERVER['DOCUMENT_ROOT'].'/../../lib/php/db/page.php');
?>