update project with new architecture
This commit is contained in:
88
nationchains/www/setup/index.html
Normal file
88
nationchains/www/setup/index.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>setup apXtrib</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<style>
|
||||
.fakeimg {
|
||||
height: 200px;
|
||||
background: #aaa;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="p-5 bg-primary text-white text-center">
|
||||
<h1>apXtrib setup a new Towns</h1>
|
||||
<p>Resize this responsive page to see the effect!</p>
|
||||
</div>
|
||||
|
||||
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<h2>About Me</h2>
|
||||
<h5>Photo of me:</h5>
|
||||
<div class="fakeimg">Fake Image</div>
|
||||
<p>Some text about me in culpa qui officia deserunt mollit anim..</p>
|
||||
<h3 class="mt-4">Some Links</h3>
|
||||
<p>Lorem ipsum dolor sit ame.</p>
|
||||
<ul class="nav nav-pills flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr class="d-sm-none">
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<h2>TITLE HEADING</h2>
|
||||
<h5>Title description, Dec 7, 2020</h5>
|
||||
<div class="fakeimg">Fake Image</div>
|
||||
<p>Some text..</p>
|
||||
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
||||
|
||||
<h2 class="mt-5">TITLE HEADING</h2>
|
||||
<h5>Title description, Sep 2, 2020</h5>
|
||||
<div class="fakeimg">Fake Image</div>
|
||||
<p>Some text..</p>
|
||||
<p>Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 p-4 bg-dark text-white text-center">
|
||||
<p>Footer</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
58
nationchains/www/setup/nginx/modelwebsite.conf.mustache
Executable file
58
nationchains/www/setup/nginx/modelwebsite.conf.mustache
Executable file
@@ -0,0 +1,58 @@
|
||||
server {
|
||||
server_name {{#dns}} {{.}} {{/dns}};
|
||||
add_header X-Request-ID $request_id; # Return to client
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Access-Control-Max-Age 3600;
|
||||
add_header Access-Control-Expose-Headers Content-Length;
|
||||
add_header Access-Control-Allow-Headers Range;
|
||||
|
||||
access_log {{{dirname}}}/{{{nginx.fswww}}}logs/nginx/{{{nginx.website}}}.{{{nginx.tribeid}}}.access.log main;
|
||||
# /plugins/pluginame/components/xxx?plugin=pluginname&pluginkey=key
|
||||
# acess if exist pluginkey
|
||||
location /plugins/ {
|
||||
add_header X-debug "plugins local $arg_plugin/keys/$arg_pluginkey sent";
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}/plugins/;
|
||||
if (-f {{{dirname}}}/{{{nginx.fswww}}}/plugins/$arg_plugin/keys/$arg_pluginkey) {
|
||||
rewrite /plugins/([^/]+)/components/([^\?]+) /$1/components/$2 break;
|
||||
}
|
||||
return 403 "No valid token access for plugin:$arg_plugin with token:$arg_pluginkey please ask your admin";
|
||||
}
|
||||
|
||||
location /cdn/ {
|
||||
rewrite /cdn/(.*$) /$1 break;
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}/www/cdn/;
|
||||
}
|
||||
|
||||
location /spacedev/ {
|
||||
rewrite /spacedev/(.*$) /$1 break;
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}/spacedev/{{{website}}}/dist/;
|
||||
}
|
||||
|
||||
location /app/ {
|
||||
rewrite /app/(.*$) /$1 break;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_max_body_size 10m;
|
||||
client_body_buffer_size 128k;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 90;
|
||||
proxy_read_timeout 90;
|
||||
proxy_buffers 32 4k;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_pass http://localhost:{{{apiport}}};
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
location / {
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}/www/app/{{{website}}};
|
||||
index index.html {{{pageindex}}};
|
||||
}
|
||||
error_page 404 /404.html;
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/local/nginx/html;
|
||||
}
|
||||
}
|
34
nationchains/www/setup/nginx/nginx.conf.mustache
Executable file
34
nationchains/www/setup/nginx/nginx.conf.mustache
Executable file
@@ -0,0 +1,34 @@
|
||||
user {{sudoerUser}};
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
#include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '[$time_local]##"$http_x_forwarded_for"##"$request" '
|
||||
'"$http_user_agent"';
|
||||
|
||||
log_format mainold '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
log_format trace '$remote_addr - $remote_user [$time_local] '
|
||||
'$host "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'"$http_x_forwarded_for" $request_id';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
{{#nginx.include}}
|
||||
include {{.}};
|
||||
{{/nginx.include}}
|
||||
}
|
24
nationchains/www/setup/townconf.json
Normal file
24
nationchains/www/setup/townconf.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"nationName":"ants",
|
||||
"townName":"setuptown",
|
||||
"tribeName":"setuptribe",
|
||||
"dns":"mydnsapxtrib",
|
||||
"apiport":3018,
|
||||
"language":["en"],
|
||||
"jwtsecret":"longsentenceusedtoencryptionChangethisforproduction",
|
||||
"saltRounds":10,
|
||||
"exposedHeaders":[ "xauth", "xpaganid", "xlang", "xtribe", "xworkon", "xapp" ],
|
||||
"unittesting":["middlewares","models","routes","nationchains"],
|
||||
"appset":{"trust proxy":true},
|
||||
"bodyparse": {
|
||||
"urlencoded": {
|
||||
"limit": "50mb",
|
||||
"extended": true
|
||||
},
|
||||
"json": { "limit": "500mb" }
|
||||
},
|
||||
"nginx":{
|
||||
"worker_connections":1024,
|
||||
"include":["/etc/nginx/conf.d/*.conf", "include /etc/nginx/sites-enabled/*"]
|
||||
}
|
||||
}
|
25
nationchains/www/setup/tribeconf.json
Executable file
25
nationchains/www/setup/tribeconf.json
Executable file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"tribeid": "${tribeName}",
|
||||
"genericpsw": "",
|
||||
"saltRounds": "12",
|
||||
"allowedDOMs": ["${townName}.${nationName}.${dns}"],
|
||||
"customization": {
|
||||
"claim": "Be a Producer, not a product.",
|
||||
"name": "apxtrib",
|
||||
"logo": "https://${townName}.${nationName}.${dns}/static/img/chartegraphique/logo_bgtransparent.png",
|
||||
"favicon": "https://${townName}.${nationName}.${dns}/static/img//chartegraphique/favicon.png",
|
||||
"colors": {
|
||||
"primary": "#01717B",
|
||||
"secondary": "#CA5F00",
|
||||
"success": "",
|
||||
"info": "",
|
||||
"warning": "",
|
||||
"danger": "",
|
||||
"light": "#fff",
|
||||
"dark": "#222"
|
||||
}
|
||||
},
|
||||
"smtp": {},
|
||||
"accepted-language": "fr,en",
|
||||
"langueReferential": ["fr"]
|
||||
}
|
Reference in New Issue
Block a user