Compare commits

..

5 Commits

Author SHA1 Message Date
mdipierro
2e4449796e tesing 2018-05-01 15:41:53 -05:00
mdipierro
4eb82780ea tesing 2018-05-01 15:34:07 -05:00
mdipierro
09d400fab3 tesing 2018-05-01 15:19:57 -05:00
mdipierro
59957954fd tesing 2018-05-01 14:51:39 -05:00
mdipierro
d052d1e06c tesing 2018-05-01 14:33:56 -05:00
139 changed files with 249 additions and 3421 deletions

View File

@@ -1 +1 @@
Version 2.16.1-stable+timestamp.2018.05.24.15.00.45
Version 2.16.1-stable+timestamp.2018.03.08.10.23.01

View File

@@ -43,8 +43,8 @@ class Servers:
@staticmethod
def cherrypy(app, address, **options):
from cheroot.wsgi import Server as WSGIServer
server = WSGIServer(address, app)
from cherrypy import wsgiserver
server = wsgiserver.CherryPyWSGIServer(address, app)
server.start()
@staticmethod

View File

@@ -224,15 +224,15 @@ def select():
session.last_orderby = orderby
session.last_query = request.vars.query
form = FORM(TABLE(TR(T('Query:'), '', INPUT(_style='width:400px',
_name='query', _value=request.vars.query or '', _class="form-control",
_name='query', _value=request.vars.query or '',
requires=IS_NOT_EMPTY(
error_message=T("Cannot be empty")))), TR(T('Update:'),
INPUT(_name='update_check', _type='checkbox',
value=False), INPUT(_style='width:400px',
_name='update_fields', _value=request.vars.update_fields
or '', _class="form-control")), TR(T('Delete:'), INPUT(_name='delete_check',
or '')), TR(T('Delete:'), INPUT(_name='delete_check',
_class='delete', _type='checkbox', value=False), ''),
TR('', '', INPUT(_type='submit', _value=T('submit'), _class="btn btn-primary"))),
TR('', '', INPUT(_type='submit', _value=T('submit')))),
_action=URL(r=request, args=request.args))
tb = None
@@ -274,7 +274,7 @@ def select():
formcsv = FORM(str(T('or import from csv file')) + " ",
INPUT(_type='file', _name='csvfile'),
INPUT(_type='hidden', _value=csv_table, _name='table'),
INPUT(_type='submit', _value=T('import'), _class="btn btn-primary"))
INPUT(_type='submit', _value=T('import')))
else:
formcsv = None
if formcsv and formcsv.process().accepted:
@@ -392,7 +392,7 @@ def ccache():
cache.disk.clear()
session.flash += T("Disk Cleared")
redirect(URL(r=request))
try:
from pympler.asizeof import asizeof
except ImportError:
@@ -588,7 +588,7 @@ def manage():
auth.table_permission().group_id.label = T('Role')
auth.table_permission().name.label = T('Permission')
if table == auth.table_user():
linked_tables = [auth.settings.table_membership_name]
linked_tables=[auth.settings.table_membership_name]
elif table == auth.table_group():
orderby = 'role' if not request.args(3) or '.group_id' not in request.args(3) else None
elif table == auth.table_permission():
@@ -604,13 +604,13 @@ def manage():
def hooks():
import functools
import inspect
list_op = ['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
tables = []
with_build_it = False
list_op=['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
tables=[]
with_build_it=False
for db_str in sorted(databases):
db = databases[db_str]
for t in db.tables:
method_hooks = []
method_hooks=[]
for op in list_op:
functions = []
for f in getattr(db[t], op):
@@ -630,16 +630,16 @@ def hooks():
except:
pass
if len(functions):
method_hooks.append({'name': op, 'functions':functions})
method_hooks.append({'name':op, 'functions':functions})
if len(method_hooks):
tables.append({'name': "%s.%s" % (db_str, t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
tables.append({'name':"%s.%s" % (db_str,t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
# Render
ul_main = UL(_class='nav nav-list')
for t in tables:
ul_main.append(A(t['name'], _onclick="collapse('a_%s')" % t['slug']))
ul_t = UL(_class='nav nav-list', _id="a_%s" % t['slug'], _style='display:none')
for op in t['method_hooks']:
ul_t.append(LI(op['name']))
ul_t.append(LI (op['name']))
ul_t.append(UL([LI(A(f['funcname'], _class="editor_filelink", _href=f['url']if 'url' in f else None, **{'_data-lineno':f['lineno']-1})) for f in op['functions']]))
ul_main.append(ul_t)
return ul_main
@@ -652,10 +652,10 @@ def hooks():
def d3_graph_model():
""" See https://www.facebook.com/web2py/posts/145613995589010 from Bruno Rocha
and also the app_admin bg_graph_model function
Create a list of table dicts, called "nodes"
"""
nodes = []
links = []
@@ -665,20 +665,20 @@ def d3_graph_model():
fields = []
for field in db[tablename]:
f_type = field.type
if not isinstance(f_type, str):
if not isinstance(f_type,str):
disp = ' '
elif f_type == 'string':
disp = field.length
disp = field.length
elif f_type == 'id':
disp = "PK"
disp = "PK"
elif f_type.startswith('reference') or \
f_type.startswith('list:reference'):
disp = "FK"
else:
disp = ' '
fields.append(dict(name=field.name, type=field.type, disp=disp))
fields.append(dict(name= field.name, type=field.type, disp = disp))
if isinstance(f_type, str) and (
if isinstance(f_type,str) and (
f_type.startswith('reference') or
f_type.startswith('list:reference')):
referenced_table = f_type.split()[1].split('.')[0]

View File

@@ -9,19 +9,16 @@
});
//--></script>
<div class="row">
<div class="col-md-12">
{{if request.function=='index':}}
<h2>{{=T("Available Databases and Tables")}}</h2>
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
<ul class="nav nav-tabs" id="myTab">
<li class="nav-item"><a href="#alltables" data-toggle="tab" class="nav-link active">Tables</a></li>
<li class="nav-item"><a href="#hooks" data-toggle="tab" class="nav-link">Hooks</a></li>
<li class="active" ><a href="#alltables" data-toggle="tab">Tables</a></li>
<li><a href="#hooks" data-toggle="tab">Hooks</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="alltables">
<table class="table table-striped">
<table class="table">
{{for db in sorted(databases):}}
{{for table in databases[db].tables:}}
{{qry='%s.%s.id>0'%(db,table)}}
@@ -40,10 +37,10 @@
{{pass}}
<tr>
<th style="font-size: 1.75em;">
&raquo; {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</th>
<td>
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-primary")}}
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-default")}}
</td>
</tr>
{{pass}}
@@ -64,31 +61,28 @@
</pre>
{{pass}}
{{if table:}}
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-primary", _role="button")}}<br/><br/>
<hr />
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-default")}}<br/><br/>
<h3>{{=T("Rows in Table")}}</h3><br/>
{{else:}}
<h3>{{=T("Rows selected")}}</h3><br/>
{{pass}}
{{=form}}
<p class="text-muted">{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
<br/><br/>
<h4>{{=T("%s selected", nrows)}}</h4>
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-primary")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-primary")}}{{pass}}
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-default")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-default")}}{{pass}}
{{if rows:}}
<div style="overflow:auto; width:80%;">
{{linkto = lambda f, t, r: URL('update', args=[request.args[0], r, f]) if f else "#"}}
{{upload=URL('download',args=request.args[0])}}
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='table table-striped table-bordered sortable')}}
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
</div>
{{pass}}
<br/><br/>
<hr />
<h3>{{=T("Import/Export")}}</h3><br/>
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-primary">{{=T("export as csv file")}}</a>
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-default">{{=T("export as csv file")}}</a>
{{=formcsv or ''}}
{{elif request.function=='insert':}}
@@ -274,6 +268,3 @@
{{pass}}
</div>
{{pass}}
</div>
</div>

View File

@@ -224,15 +224,15 @@ def select():
session.last_orderby = orderby
session.last_query = request.vars.query
form = FORM(TABLE(TR(T('Query:'), '', INPUT(_style='width:400px',
_name='query', _value=request.vars.query or '', _class="form-control",
_name='query', _value=request.vars.query or '',
requires=IS_NOT_EMPTY(
error_message=T("Cannot be empty")))), TR(T('Update:'),
INPUT(_name='update_check', _type='checkbox',
value=False), INPUT(_style='width:400px',
_name='update_fields', _value=request.vars.update_fields
or '', _class="form-control")), TR(T('Delete:'), INPUT(_name='delete_check',
or '')), TR(T('Delete:'), INPUT(_name='delete_check',
_class='delete', _type='checkbox', value=False), ''),
TR('', '', INPUT(_type='submit', _value=T('submit'), _class="btn btn-primary"))),
TR('', '', INPUT(_type='submit', _value=T('submit')))),
_action=URL(r=request, args=request.args))
tb = None
@@ -274,7 +274,7 @@ def select():
formcsv = FORM(str(T('or import from csv file')) + " ",
INPUT(_type='file', _name='csvfile'),
INPUT(_type='hidden', _value=csv_table, _name='table'),
INPUT(_type='submit', _value=T('import'), _class="btn btn-primary"))
INPUT(_type='submit', _value=T('import')))
else:
formcsv = None
if formcsv and formcsv.process().accepted:
@@ -392,7 +392,7 @@ def ccache():
cache.disk.clear()
session.flash += T("Disk Cleared")
redirect(URL(r=request))
try:
from pympler.asizeof import asizeof
except ImportError:
@@ -588,7 +588,7 @@ def manage():
auth.table_permission().group_id.label = T('Role')
auth.table_permission().name.label = T('Permission')
if table == auth.table_user():
linked_tables = [auth.settings.table_membership_name]
linked_tables=[auth.settings.table_membership_name]
elif table == auth.table_group():
orderby = 'role' if not request.args(3) or '.group_id' not in request.args(3) else None
elif table == auth.table_permission():
@@ -604,13 +604,13 @@ def manage():
def hooks():
import functools
import inspect
list_op = ['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
tables = []
with_build_it = False
list_op=['_%s_%s' %(h,m) for h in ['before', 'after'] for m in ['insert','update','delete']]
tables=[]
with_build_it=False
for db_str in sorted(databases):
db = databases[db_str]
for t in db.tables:
method_hooks = []
method_hooks=[]
for op in list_op:
functions = []
for f in getattr(db[t], op):
@@ -630,16 +630,16 @@ def hooks():
except:
pass
if len(functions):
method_hooks.append({'name': op, 'functions':functions})
method_hooks.append({'name':op, 'functions':functions})
if len(method_hooks):
tables.append({'name': "%s.%s" % (db_str, t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
tables.append({'name':"%s.%s" % (db_str,t), 'slug': IS_SLUG()("%s.%s" % (db_str,t))[0], 'method_hooks':method_hooks})
# Render
ul_main = UL(_class='nav nav-list')
for t in tables:
ul_main.append(A(t['name'], _onclick="collapse('a_%s')" % t['slug']))
ul_t = UL(_class='nav nav-list', _id="a_%s" % t['slug'], _style='display:none')
for op in t['method_hooks']:
ul_t.append(LI(op['name']))
ul_t.append(LI (op['name']))
ul_t.append(UL([LI(A(f['funcname'], _class="editor_filelink", _href=f['url']if 'url' in f else None, **{'_data-lineno':f['lineno']-1})) for f in op['functions']]))
ul_main.append(ul_t)
return ul_main
@@ -652,10 +652,10 @@ def hooks():
def d3_graph_model():
""" See https://www.facebook.com/web2py/posts/145613995589010 from Bruno Rocha
and also the app_admin bg_graph_model function
Create a list of table dicts, called "nodes"
"""
nodes = []
links = []
@@ -665,20 +665,20 @@ def d3_graph_model():
fields = []
for field in db[tablename]:
f_type = field.type
if not isinstance(f_type, str):
if not isinstance(f_type,str):
disp = ' '
elif f_type == 'string':
disp = field.length
disp = field.length
elif f_type == 'id':
disp = "PK"
disp = "PK"
elif f_type.startswith('reference') or \
f_type.startswith('list:reference'):
disp = "FK"
else:
disp = ' '
fields.append(dict(name=field.name, type=field.type, disp=disp))
fields.append(dict(name= field.name, type=field.type, disp = disp))
if isinstance(f_type, str) and (
if isinstance(f_type,str) and (
f_type.startswith('reference') or
f_type.startswith('list:reference')):
referenced_table = f_type.split()[1].split('.')[0]

View File

@@ -9,19 +9,16 @@
});
//--></script>
<div class="row">
<div class="col-md-12">
{{if request.function=='index':}}
<h2>{{=T("Available Databases and Tables")}}</h2>
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
<ul class="nav nav-tabs" id="myTab">
<li class="nav-item"><a href="#alltables" data-toggle="tab" class="nav-link active">Tables</a></li>
<li class="nav-item"><a href="#hooks" data-toggle="tab" class="nav-link">Hooks</a></li>
<li class="active" ><a href="#alltables" data-toggle="tab">Tables</a></li>
<li><a href="#hooks" data-toggle="tab">Hooks</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="alltables">
<table class="table table-striped">
<table class="table">
{{for db in sorted(databases):}}
{{for table in databases[db].tables:}}
{{qry='%s.%s.id>0'%(db,table)}}
@@ -40,10 +37,10 @@
{{pass}}
<tr>
<th style="font-size: 1.75em;">
&raquo; {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
</th>
<td>
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-primary")}}
{{=A(str(T('New Record')),_href=URL('insert',args=[db,table]),_class="btn btn-default")}}
</td>
</tr>
{{pass}}
@@ -64,31 +61,28 @@
</pre>
{{pass}}
{{if table:}}
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-primary", _role="button")}}<br/><br/>
<hr />
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn btn-default")}}<br/><br/>
<h3>{{=T("Rows in Table")}}</h3><br/>
{{else:}}
<h3>{{=T("Rows selected")}}</h3><br/>
{{pass}}
{{=form}}
<p class="text-muted">{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
<br/><br/>
<h4>{{=T("%s selected", nrows)}}</h4>
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-primary")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-primary")}}{{pass}}
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn btn-default")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn btn-default")}}{{pass}}
{{if rows:}}
<div style="overflow:auto; width:80%;">
{{linkto = lambda f, t, r: URL('update', args=[request.args[0], r, f]) if f else "#"}}
{{upload=URL('download',args=request.args[0])}}
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='table table-striped table-bordered sortable')}}
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
</div>
{{pass}}
<br/><br/>
<hr />
<h3>{{=T("Import/Export")}}</h3><br/>
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-primary">{{=T("export as csv file")}}</a>
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
<a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}" class="btn btn-default">{{=T("export as csv file")}}</a>
{{=formcsv or ''}}
{{elif request.function=='insert':}}
@@ -274,6 +268,3 @@
{{pass}}
</div>
{{pass}}
</div>
</div>

View File

@@ -111,7 +111,6 @@
</li><li>Ovidio Marinho Falcao Neto (tests and plugin developer)
</li><li>Pai (internationalization)
</li><li>Paolo Caruccio (SQLFORM.grid query)
</li><li>Paolo Pastori
</li><li>Patrick Breitenbach
</li><li><a href="mailto:phyo.arkarlwin@star-nix.net">Phyo Arkar Lwin</a> (web hosting and Jython tester)
</li><li>Pierre Thibault (<a href="http://code.google.com/p/neo-web2py2eclipse/">Eclipse integration</a> and custom import)

View File

@@ -22,12 +22,11 @@
'Administrative interface': 'Interface administrativa',
'Ajax Recipes': 'Receitas de Ajax',
'An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page',
'API Example': 'API Example',
'appadmin is disabled because insecure channel': 'Administração desativada porque o canal não é seguro',
'Are you sure you want to delete this object?': 'Você tem certeza que quer apagar este objeto?',
'Available Databases and Tables': 'Bancos de dados e tabelas disponíveis',
'Buy this book': 'Compre o livro',
"Buy web2py's book": 'Compre o livro do web2py',
"Buy web2py's book": 'Compre o livro do web2buy',
'cache': 'cache',
'Cache': 'Cache',
'Cache Cleared': 'Cache limpo',
@@ -83,7 +82,6 @@
'Forms and Validators': 'Formulários e Validadores',
'Free Applications': 'Aplicações gratuitas',
'Graph Model': 'Graph Model',
'Grid Example': 'Exemplo de Grade',
'Group ID': 'ID do Grupo',
'Groups': 'Grupos',
'Hello World': 'Olá Mundo',
@@ -108,27 +106,26 @@
'Layouts': 'Layouts',
'Live chat': 'Chat ao vivo',
'Live Chat': 'Chat ao vivo',
'Log In': 'Entrar',
'Log In': 'Log In',
'login': 'Entrar',
'Login': 'Entrar',
'Login': 'Autentique-se',
'logout': 'Sair',
'Lost Password': 'Esqueceu sua senha?',
'lost password?': 'esqueceu sua senha?',
'Lost your password?': 'Esqueceu sua senha?',
'Main Menu': 'Menu Principal',
'Manage %(action)s': 'Gerenciar %(action)s',
'Manage Access Control': 'Gerenciar controle de acesso',
'Manage %(action)s': 'Manage %(action)s',
'Manage Access Control': 'Manage Access Control',
'Manage Cache': 'Gerenciar Cache',
'Memberships': 'Grupos',
'Memberships': 'Memberships',
'Menu Model': 'Modelo de Menu',
'My Sites': 'Meus sites',
'Name': 'Nome',
'New Record': 'Novo Registro',
'new record inserted': 'novo registro inserido',
'next %s rows': 'próximas %s ´linhas',
'next %s rows': 'next %s rows',
'next 100 rows': 'próximas 100 linhas',
'No databases in this application': 'Não há bancos de dados nesta aplicação',
'Number of entries: **%s**': 'Número de entradas: **%s**',
'Number of entries: **%s**': 'Number of entries: **%s**',
'Object or table name': 'Nome do objeto do da tabela',
'Online book': 'Online book',
'Online examples': 'Exemplos online',
@@ -143,37 +140,35 @@
'Plugins': 'Plugins',
'Powered by': 'Desenvolvido com',
'Preface': 'Prefácio',
'previous %s rows': '%s linhas anteriores',
'previous %s rows': 'previous %s rows',
'previous 100 rows': '100 linhas anteriores',
'pygraphviz library not found': 'biblioteca pygraphviz não encontrada',
'pygraphviz library not found': 'pygraphviz library not found',
'Python': 'Python',
'Query:': 'Consulta:',
'Quick Examples': 'Exemplos rápidos',
'RAM': 'RAM',
'RAM Cache Keys': 'RAM Cache Keys',
'Ram Cleared': 'Ram Limpa',
'Ram Cleared': 'Ram Cleared',
'RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.': 'RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.',
'Recipes': 'Receitas',
'Record': 'Registro',
'record does not exist': 'registro não existe',
'Record ID': 'ID do Registro',
'Record id': 'id do registro',
'register': 'Registre-se',
'Register': 'Registre-se',
'register': 'Registre-se',
'Registration identifier': 'Idenficador de registro',
'Registration key': 'Chave de registro',
'Remember me (for 30 days)': 'Mantenha-me logado (por 30 dias)',
'Reset Password key': 'Resetar chave de senha',
'Resources': 'Recursos',
'Role': 'Papel',
'Roles': 'Roles',
'Rows in Table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas',
'Save model as...': 'Salvar modelo como...',
'Save model as...': 'Save model as...',
'Semantic': 'Semântico',
'Services': 'Serviço',
'Sign Up': 'Cadastrar',
'Sign up': 'Cadastrar',
'Sign Up': 'Sign Up',
'Size of cache:': 'Tamanho do cache:',
'state': 'estado',
'Statistics': 'Estatísticas',
@@ -209,7 +204,6 @@
'Welcome to web2py': 'Bem-vindo ao web2py',
'Welcome to web2py!': 'Bem-vindo ao web2py!',
'Which called the function %s located in the file %s': 'Que chamou a função %s localizada no arquivo %s',
'Wiki Example': 'Wiki Example',
'Working...': 'Trabalhando...',
'You are successfully running web2py': 'Você está executando o web2py com sucesso',
'You are successfully running web2py.': 'Você está executando o web2py com sucesso.',

View File

@@ -130,7 +130,7 @@ response.google_analytics_id = configuration.get('google.analytics_id')
# -------------------------------------------------------------------------
if configuration.get('scheduler.enabled'):
from gluon.scheduler import Scheduler
scheduler = Scheduler(db, heartbeat=configuration.get('scheduler.heartbeat'))
scheduler = Scheduler(db, heartbeat=configuration.get('heartbeat'))
# -------------------------------------------------------------------------
# Define your tables below (or better in another model file) for example

View File

@@ -9,9 +9,6 @@
});
//--></script>
<div class="row">
<div class="col-md-12">
{{if request.function=='index':}}
<h2>{{=T("Available Databases and Tables")}}</h2>
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
@@ -274,6 +271,3 @@
{{pass}}
</div>
{{pass}}
</div>
</div>

View File

@@ -8,44 +8,40 @@
</div>
{{end}}
<div class="row">
<div class="col-md-12">
{{if 'message' in globals():}}
<h2>{{=message}}</h2>
<p class="lead">{{=T('How did you get here?')}}</p>
<ol style="word-wrap:break-word;">
<li>{{=T('You are successfully running web2py')}}</li>
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
<li>{{=XML(T('Which called the function %s located in the file %s',
(A(request.function+'()',_href='#'),
A('web2py/applications/%(application)s/controllers/%(controller)s.py' % request,
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
A('web2py/applications/%(application)s/views/%(controller)s/index.html' % request,
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
</ol>
<div class="jumbotron jumbotron-fluid" style="padding:30px;word-wrap:break-word;">
<div class="container center">
<a class="btn btn-primary" href="{{=URL('admin','default','index')}}">
<i class="fa fa-cog"></i>
{{=T("admin")}}
</a>
<a class="btn btn-secondary" href="{{=URL('examples','default','index')}}">{{=T("Online examples")}}</a>
<a class="btn btn-secondary" href="http://web2py.com">web2py.com</a>
<a class="btn btn-secondary" href="http://web2py.com/book">{{=T('Documentation')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','api_get_user_email')}}">{{=T('API Example')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','grid/auth_user')}}">{{=T('Grid Example')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','wiki')}}">{{=T('Wiki Example')}}</a>
</div>
</div>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{if 'message' in globals():}}
<h2>{{=message}}</h2>
<p class="lead">{{=T('How did you get here?')}}</p>
<ol style="word-wrap:break-word;">
<li>{{=T('You are successfully running web2py')}}</li>
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
<li>{{=XML(T('Which called the function %s located in the file %s',
(A(request.function+'()',_href='#'),
A('web2py/applications/%(application)s/controllers/%(controller)s.py' % request,
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
A('web2py/applications/%(application)s/views/%(controller)s/index.html' % request,
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
</ol>
<div class="jumbotron jumbotron-fluid" style="padding:30px;word-wrap:break-word;">
<div class="container center">
<a class="btn btn-primary" href="{{=URL('admin','default','index')}}">
<i class="fa fa-cog"></i>
{{=T("admin")}}
</a>
<a class="btn btn-secondary" href="{{=URL('examples','default','index')}}">{{=T("Online examples")}}</a>
<a class="btn btn-secondary" href="http://web2py.com">web2py.com</a>
<a class="btn btn-secondary" href="http://web2py.com/book">{{=T('Documentation')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','api_get_user_email')}}">{{=T('API Example')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','grid/auth_user')}}">{{=T('Grid Example')}}</a>
<a class="btn btn-secondary" href="{{=URL('default','wiki')}}">{{=T('Wiki Example')}}</a>
</div>
</div>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}

View File

@@ -1,24 +1,26 @@
{{extend 'layout.html'}}
<div class="row">
<div id="web2py_user_form" class="col-lg-6" style="background-color:white; margin: 0 auto 5px auto; box-shadow: 0 0 5px #a1a1a1; border-radius:5px;padding: 20px">
<h2>
{{=T('Sign Up') if request.args(0) == 'register' else T('Log In') if request.args(0) == 'login' else T(request.args(0).replace('_',' ').title())}}
</h2>
{{=form}}
{{if request.args(0)=='login' and not 'register' in auth.settings.actions_disabled:}}
<a href="{{=URL('user/register')}}">{{=T('Register')}}</a>
<br/>
{{pass}}
{{if request.args(0)=='login' and not 'request_reset_password' in auth.settings.actions_disabled:}}
<a href="{{=URL('user/request_reset_password')}}">{{=T('Lost your password?')}}</a>
{{pass}}
{{if request.args(0)=='register':}}
<a href="{{=URL('user/login')}}">{{=T('Login')}}</a>
{{pass}}
</div>
</div>
<h2>
{{=T('Sign Up') if request.args(0) == 'register' else T('Log In') if request.args(0) == 'login' else T(request.args(0).replace('_',' ').title())}}
</h2>
<div class="container">
<div class="row">
<div id="web2py_user_form" class="col-lg-6">
{{
if request.args(0)=='login':
if not 'register' in auth.settings.actions_disabled:
form.add_button(T('Sign Up'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn btn-default btn-secondary')
pass
if not 'request_reset_password' in auth.settings.actions_disabled:
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default btn-secondary')
pass
pass
=form
}}
</div>
</div>
</div>
{{block page_js}}

View File

@@ -35,13 +35,13 @@
<body>
<div class="w2p_flash alert alert-dismissable">{{=response.flash or ''}}</div>
<!-- Navbar ======================================= -->
<nav class="navbar navbar-light navbar-expand-md bg-faded justify-content-center">
<a href="http://web2py.com" class="navbar-brand d-flex w-50 mr-auto">web2py</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse w-100" id="navbarNavDropdown">
<ul class="navbar-nav w-100 justify-content-center">
<nav class="navbar navbar-expand-lg navbar-light bg-faded">
<a class="navbar-brand" href="http://web2py.com">web2py</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbarNavDropdown" class="collapse navbar-collapse">
<ul class="navbar-nav">
{{for _item in response.menu or []:}}
{{if len(_item)<4 or not _item[3]:}}
<li class="nav-item {{if _item[1]:}}active{{pass}}">
@@ -57,13 +57,13 @@
</div>
</li>
{{pass}}
{{pass}}
{{pass}}
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
</form>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
</form>
{{if 'auth' in globals():}}
<ul class="nav navbar-nav ml-auto w-100 justify-content-end">
<ul class="navbar-nav ml-lg-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{if auth.user:}}{{=auth.user.first_name}}{{else:}}LOGIN{{pass}}
@@ -86,19 +86,25 @@
{{pass}}
</div>
</li>
</ul>
</ul>
{{pass}}
</div>
</nav>
<!-- Masthead ===================================== -->
<!-- Masthead ===================================== -->
{{block header}}
{{end}}
<!-- Main ========================================= -->
<!-- Begin page content -->
<div class="container-fluid main-container">
{{include}}
{{=response.toolbar() if response.show_toolbar else ''}}
<div class="row">
<div class="col-md-12">
{{block center}}
{{include}}
{{end}}
{{=response.toolbar() if response.show_toolbar else ''}}
</div>
</div>
</div>
{{block footer}} <!-- this is default footer -->

View File

@@ -1,25 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget py-gunicorn && \
pip install --upgrade pip && \
pip install virtualenv
RUN addgroup -S web2py && \
adduser -D -S -G web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-gunicorn
docker build -t username/alpine-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gunicorn username/alpine-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-gunicorn
docker login -u username
docker build -t username/alpine-web2py-gunicorn .
docker push username/alpine-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/alpine-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gunicorn username/alpine-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,20 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget openssl && \
pip install --upgrade pip && \
pip install virtualenv
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /web2py/applications/examples && \
cd /web2py && \
openssl genrsa 1024 > web2py.key && chmod 400 web2py.key && \
openssl req -new -x509 -nodes -sha1 -days 1780 -subj '/C=c/ST=st/L=l/O=o/OU=ou/CN=cn.com' -key web2py.key > web2py.crt && \
openssl x509 -noout -fingerprint -text < web2py.crt > web2py.info && \
chmod 755 -R /web2py
WORKDIR /web2py
EXPOSE 443
CMD python /web2py/web2py.py --nogui --no-banner -a 'a' -c web2py.crt -k web2py.key -i 0.0.0.0 -p 443

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-rocket-ssl
docker build -t username/alpine-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name alpine-web2py-rocket-ssl username/alpine-web2py-rocket-ssl
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-rocket-ssl
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-rocket-ssl
docker login -u username
docker build -t username/alpine-web2py-rocket-ssl .
docker push username/alpine-web2py-rocket-ssl
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/alpine-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name alpine-web2py-rocket-ssl username/
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket-ssl:
build: .
ports:
- "443:443"
volumes:
- applications:/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv
RUN addgroup -S web2py && \
adduser -D -S -G web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-rocket
docker build -t username/alpine-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-rocket username/alpine-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-rocket
docker login -u username
docker build -t username/alpine-web2py-rocket .
docker push username/alpine-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/alpine-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-rocket username/
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget py-tornado && \
pip install --upgrade pip && \
pip install virtualenv
RUN addgroup -S web2py && \
adduser -D -S -G web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-tornado
docker build -t username/alpine-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-tornado username/alpine-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-tornado
docker login -u username
docker build -t username/alpine-web2py-tornado .
docker push username/alpine-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/alpine-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-tornado username/
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM centos:latest
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-gunicorn --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-gunicorn
docker build -t username/centos-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gunicorn username/centos-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-gunicorn
docker login -u username
docker build -t username/centos-web2py-gunicorn .
docker push username/centos-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/centos-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gunicorn username/centos-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM centos:latest
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-rocket
docker build -t username/centos-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-rocket username/centos-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-rocket
docker login -u username
docker build -t username/centos-web2py-rocket .
docker push username/centos-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/centos-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-rocket username/centos-web2py-rocket
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM centos:latest
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-tornado --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-tornado
docker build -t username/centos-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-tornado username/centos-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-tornado
docker login -u username
docker build -t username/centos-web2py-tornado .
docker push username/centos-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/centos-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-tornado username/centos-web2py-tornado
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM debian:latest
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget gunicorn && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-gunicorn
docker build -t username/debian-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gunicorn username/debian-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-gunicorn
docker login -u username
docker build -t username/debian-web2py-gunicorn .
docker push username/debian-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/debian-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gunicorn username/debian-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM debian:latest
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-rocket
docker build -t username/debian-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-rocket username/debian-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-rocket
docker login -u username
docker build -t username/debian-web2py-rocket .
docker push username/debian-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/debian-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-rocket username/debian-web2py-rocket
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,26 +0,0 @@
FROM debian:latest
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-tornado && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-tornado
docker build -t username/debian-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-tornado username/debian-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-tornado
docker login -u username
docker build -t username/debian-web2py-tornado .
docker push username/debian-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/debian-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-tornado username/debian-web2py-tornado
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM fedora:latest
RUN dnf install -y python python-pip python-setuptools unzip wget python-gunicorn --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Fedora/web2py-gunicorn
docker build -t username/fedora-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-gunicorn username/fedora-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Fedora/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Fedora/web2py-gunicorn
docker login -u username
docker build -t username/fedora-web2py-gunicorn .
docker push username/fedora-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/fedora-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-gunicorn username/fedora-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM fedora:latest
RUN dnf install -y python python-pip python-setuptools unzip wget --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Fedora/web2py-rocket
docker build -t username/fedora-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-rocket username/fedora-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Fedora/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Fedora/web2py-rocket
docker login -u username
docker build -t username/fedora-web2py-rocket .
docker push username/fedora-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/fedora-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-rocket username/fedora-web2py-rocket
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM fedora:latest
RUN dnf install -y python python-pip python-setuptools unzip wget python-tornado --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Fedora/web2py-tornado
docker build -t username/fedora-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-tornado username/fedora-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Fedora/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Fedora/web2py-tornado
docker login -u username
docker build -t username/fedora-web2py-tornado .
docker push username/fedora-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/fedora-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name fedora-web2py-tornado username/fedora-web2py-tornado
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM opensuse:latest
RUN zypper in -y python python-pip python-setuptools unzip wget python-gunicorn && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/OpenSuse/web2py-gunicorn
docker build -t username/opensuse-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-gunicorn username/opensuse-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/OpenSuse/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/OpenSuse/web2py-gunicorn
docker login -u username
docker build -t username/opensuse-web2py-gunicorn .
docker push username/opensuse-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/opensuse-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-gunicorn username/opensuse-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM opensuse:latest
RUN zypper in -y python python-pip python-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/OpenSuse/web2py-rocket
docker build -t username/opensuse-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-rocket username/opensuse-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/OpenSuse/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/OpenSuse/web2py-rocket
docker login -u username
docker build -t username/opensuse-web2py-rocket .
docker push username/opensuse-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/opensuse-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-rocket username/opensuse-web2py-rocket
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,25 +0,0 @@
FROM opensuse:latest
RUN zypper in -y python python-pip python-setuptools unzip wget python-tornado && \
pip install --upgrade pip && \
pip install virtualenv
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && /usr/bin/python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/OpenSuse/web2py-tornado
docker build -t username/opensuse-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-tornado username/opensuse-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/OpenSuse/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/OpenSuse/web2py-tornado
docker login -u username
docker build -t username/opensuse-web2py-tornado .
docker push username/opensuse-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/opensuse-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name opensuse-web2py-tornado username/opensuse-web2py-tornado
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,22 +0,0 @@
FROM python:2.7
RUN apt update && \
apt install -y unzip wget python-pip && \
pip install gunicorn
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN cd /home/web2py/ && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD python /home/web2py/web2py/anyserver.py -s gunicorn -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-gunicorn
docker build -t username/app-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-gunicorn username/app-web2py-gunicorn
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-gunicorn
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/App/web2py-gunicorn
docker login -u username
docker build -t username/app-web2py-gunicorn .
docker push username/app-web2py-gunicorn
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/app-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-gunicorn username/app-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,19 +0,0 @@
FROM python:2.7
RUN apt update && \
apt install -y unzip wget
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /web2py/applications/examples && \
cd /web2py && \
openssl genrsa 1024 > web2py.key && chmod 400 web2py.key && \
openssl req -new -x509 -nodes -sha1 -days 1780 -subj '/C=c/ST=st/L=l/O=o/OU=ou/CN=cn.com' -key web2py.key > web2py.crt && \
openssl x509 -noout -fingerprint -text < web2py.crt > web2py.info && \
chmod 755 -R /web2py
WORKDIR /web2py
EXPOSE 443
CMD python /web2py/web2py.py --nogui --no-banner -a 'a' -c web2py.crt -k web2py.key -i 0.0.0.0 -p 443

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-rocket-ssl
docker build -t username/app-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name app-web2py-rocket-ssl username/app-web2py-rocket-ssl
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-rocket-ssl
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/App/web2py-rocket-ssl
docker login -u username
docker build -t username/app-web2py-rocket-ssl .
docker push username/app-web2py-rocket-ssl
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/app-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name app-web2py-rocket-ssl username/app-web2py-rocket-ssl
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket-ssl:
build: .
ports:
- "443:443"
volumes:
- applications:/web2py/applications
volumes:
applications:

View File

@@ -1,21 +0,0 @@
FROM python:2.7
RUN apt update && \
apt install -y unzip wget
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN cd /home/web2py/ && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-rocket
docker build -t username/app-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-rocket username/app-web2py-rocket
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-rocket
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/App/web2py-rocket
docker login -u username
docker build -t username/app-web2py-rocket .
docker push username/app-web2py-rocket
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/app-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-rocket username/app-web2py-rocket
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,22 +0,0 @@
FROM python:2.7
RUN apt update && \
apt install -y unzip wget python-pip && \
pip install tornado
RUN groupadd -r web2py && \
useradd -m -r -g web2py web2py
USER web2py
RUN cd /home/web2py/ && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD python /home/web2py/web2py/anyserver.py -s tornado -i 0.0.0.0 -p 8000

View File

@@ -1,41 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-tornado
docker build -t username/app-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-tornado username/app-web2py-tornado
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-tornado
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/App/web2py-tornado
docker login -u username
docker build -t username/app-web2py-tornado .
docker push username/app-web2py-tornado
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > Dockerfile
EOF
cat Dockerfile
docker build -t username/app-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name app-web2py-tornado username/app-web2py-tornado
docker-compose up -d
docker-compose ps

View File

@@ -1,12 +0,0 @@
version: '3.1'
services:
web2py-tornado:
build: .
ports:
- "8000:8000"
volumes:
- applications:/home/web2py/web2py/applications
volumes:
applications:

View File

@@ -1,56 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-gunicorn-nginx
chmod 775 run.sh
./run.sh
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-gunicorn-nginx
docker-compose up -d
docker-compose ps
docker network ls
docker network inspect root_default
docker volume ls
docker volume inspect root_applications
# Docker Stack
docker swarm init --advertise-addr $(hostname -i)
docker stack deploy -c docker-compose.yml web2py-gunicorn-nginx
docker stack ls
docker stack ps web2py-gunicorn-nginx
docker stack services web2py-gunicorn-nginx
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > run.sh
EOF
cat run.sh
cat << EOF > w2p.conf
EOF
cat w2p.conf
cat << EOF > web2py-gunicorn
EOF
cat web2py-gunicorn
cat << EOF > web2py-nginx
EOF
cat web2py-nginx
chmod 755 run.sh
./run.sh
docker-compose up -d
docker-compose ps

View File

@@ -1,34 +0,0 @@
version: '3.1'
services:
web2py-gunicorn:
build:
context: .
dockerfile: web2py-gunicorn
container_name: web2py-gunicorn
ports:
- "9005:9005"
networks:
web2py-net:
ipv4_address: 172.25.0.22
volumes:
- applications:/home/web2py/web2py/applications
web2py-nginx:
build:
context: .
dockerfile: web2py-nginx
container_name: web2py-nginx
networks:
web2py-net:
ipv4_address: 172.25.0.23
networks:
web2py-net:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
volumes:
applications:

View File

@@ -1,34 +0,0 @@
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-gunicorn --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-nginx --format="{{.ID}}"))
docker network rm web2py-net
#docker network create web2py-net
docker network create --subnet=172.25.0.0/16 web2py-net
docker build -t web2py-gunicorn -f web2py-gunicorn .
docker build -t web2py-nginx -f web2py-nginx .
docker run -d --net web2py-net -v applications:/home/web2py/web2py/applications -p 9005:9005 --name web2py-gunicorn --ip 172.25.0.22 web2py-gunicorn
# docker exec -it web2py-gunicorn bash
sleep 2
ping -c1 -n 172.25.0.22
docker run --net web2py-net busybox ping -c1 -n web2py-gunicorn
echo "------------------------------------------------------------------"
curl -I 172.25.0.22:9005
docker run -d --net web2py-net --name web2py-nginx --ip 172.25.0.23 web2py-nginx
# docker exec -it web2py-nginx bash
sleep 2
ping -c1 -n 172.25.0.23
docker run --net web2py-net busybox ping -c1 -n web2py-nginx
echo "------------------------------------------------------------------"
curl -I 172.25.0.23
docker network ls
docker network inspect web2py-net
docker volume ls
docker volume inspect applications
docker ps -a
docker ps

View File

@@ -1,20 +0,0 @@
upstream gunicorn {
#server 172.25.0.22:9005 fail_timeout=0;
server web2py-gunicorn:9005 fail_timeout=0;
}
server {
#listen 172.25.0.23:80 default_server;
listen web2py-nginx:80 default_server;
location / {
try_files $uri @proxy_to_gunicorn;
}
location @proxy_to_gunicorn {
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://gunicorn;
}
}

View File

@@ -1,22 +0,0 @@
FROM python:2.7
RUN apt update && apt install -y unzip wget
ENV PATH=/usr/local/bin:$PATH
RUN pip install gunicorn
RUN useradd -m -r web2py
USER web2py
WORKDIR /home/web2py
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -f web2py_src.zip
WORKDIR /home/web2py/web2py
RUN cp handlers/wsgihandler.py .
CMD /usr/local/bin/gunicorn --workers 4 --timeout=90 --graceful-timeout=10 --bind :9005 wsgihandler:application

View File

@@ -1,10 +0,0 @@
FROM nginx:latest
COPY ./w2p.conf /etc/nginx/conf.d/
RUN apt update
RUN apt-get install curl -y
EXPOSE 80
CMD nginx -g "daemon off;"

View File

@@ -1,56 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-rocket-nginx
chmod 775 run.sh
./run.sh
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-rocket-nginx
docker-compose up -d
docker-compose ps
docker network ls
docker network inspect root_default
docker volume ls
docker volume inspect root_applications
# Docker Stack
docker swarm init --advertise-addr $(hostname -i)
docker stack deploy -c docker-compose.yml web2py-rocket-nginx
docker stack ls
docker stack ps web2py-rocket-nginx
docker stack services web2py-rocket-nginx
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > run.sh
EOF
cat run.sh
cat << EOF > w2p.conf
EOF
cat w2p.conf
cat << EOF > web2py-nginx
EOF
cat web2py-nginx
cat << EOF > web2py-rocket
EOF
cat web2py-rocket
chmod 755 run.sh
./run.sh
docker-compose up -d
docker-compose ps

View File

@@ -1,34 +0,0 @@
version: '3.1'
services:
web2py-rocket:
build:
context: .
dockerfile: web2py-rocket
container_name: web2py-rocket
ports:
- "8000:8000"
networks:
web2py-net:
ipv4_address: 172.25.0.22
volumes:
- applications:/home/web2py/web2py/applications
web2py-nginx:
build:
context: .
dockerfile: web2py-nginx
container_name: web2py-nginx
networks:
web2py-net:
ipv4_address: 172.25.0.23
networks:
web2py-net:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
volumes:
applications:

View File

@@ -1,34 +0,0 @@
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-rocket --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-nginx --format="{{.ID}}"))
docker network rm web2py-net
#docker network create web2py-net
docker network create --subnet=172.25.0.0/16 web2py-net
docker build -t web2py-rocket -f web2py-rocket .
docker build -t web2py-nginx -f web2py-nginx .
docker run -d --net web2py-net -v applications:/home/web2py/web2py/applications -p 8000:8000 --name web2py-rocket --ip 172.25.0.22 web2py-rocket
# docker exec -it web2py-rocket bash
sleep 2
ping -c1 -n 172.25.0.22
docker run --net web2py-net busybox ping -c1 -n web2py-rocket
echo "------------------------------------------------------------------"
curl -I 172.25.0.22:8000
docker run -d --net web2py-net --name web2py-nginx --ip 172.25.0.23 web2py-nginx
# docker exec -it web2py-nginx bash
sleep 2
ping -c1 -n 172.25.0.23
docker run --net web2py-net busybox ping -c1 -n web2py-nginx
echo "------------------------------------------------------------------"
curl -I 172.25.0.23
docker network ls
docker network inspect web2py-net
docker volume ls
docker volume inspect applications
docker ps -a
docker ps

View File

@@ -1,20 +0,0 @@
upstream gunicorn {
#server 172.25.0.22:8000 fail_timeout=0;
server web2py-rocket:8000 fail_timeout=0;
}
server {
#listen 172.25.0.23:80 default_server;
listen web2py-nginx:80 default_server;
location / {
try_files $uri @proxy_to_gunicorn;
}
location @proxy_to_gunicorn {
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://gunicorn;
}
}

View File

@@ -1,10 +0,0 @@
FROM nginx:latest
COPY ./w2p.conf /etc/nginx/conf.d/
RUN apt update
RUN apt-get install curl -y
EXPOSE 80
CMD nginx -g "daemon off;"

View File

@@ -1,25 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv
RUN addgroup -S web2py && \
adduser -D -S -G web2py web2py
USER web2py
RUN virtualenv /home/web2py && \
rm -rf /home/web2py/web2py && \
cd /home/web2py/ && \
rm -f web2py_src.zip && \
wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /home/web2py/web2py/applications/examples && \
chmod 755 -R /home/web2py/web2py
WORKDIR /home/web2py/web2py
EXPOSE 8000
CMD . /home/web2py/bin/activate && python /home/web2py/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000

View File

@@ -1,66 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-rocket-ssl-nginx-db-adminer
chmod 775 run.sh
./run.sh
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-rocket-ssl-nginx-db-adminer
docker-compose up -d
docker-compose ps
docker network ls
docker network inspect root_default
docker volume ls
docker volume inspect root_applications
# Docker Stack
docker swarm init --advertise-addr $(hostname -i)
docker stack deploy -c docker-compose.yml web2py-rocket-ssl-nginx-db-adminer
docker stack ls
docker stack ps web2py-rocket-ssl-nginx-db-adminer
docker stack services web2py-rocket-ssl-nginx-db-adminer
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > run.sh
EOF
cat run.sh
cat << EOF > w2p.conf
EOF
cat w2p.conf
cat << EOF > web2py-adminer
EOF
cat web2py-adminer
cat << EOF > web2py-db
EOF
cat web2py-db
cat << EOF > web2py-nginx
EOF
cat web2py-nginx
cat << EOF > web2py-rocket-ssl
EOF
cat web2py-rocket-ssl
chmod 755 run.sh
./run.sh
docker-compose up -d
docker-compose ps

View File

@@ -1,54 +0,0 @@
version: '3.1'
services:
web2py-rocket-ssl:
build:
context: .
dockerfile: web2py-rocket-ssl
container_name: web2py-rocket-ssl
ports:
- "443:443"
networks:
web2py-net:
ipv4_address: 172.25.0.22
volumes:
- applications:/home/web2py/web2py/applications
web2py-nginx:
build:
context: .
dockerfile: web2py-nginx
container_name: web2py-nginx
networks:
web2py-net:
ipv4_address: 172.25.0.23
web2py-db:
build:
context: .
dockerfile: web2py-db
container_name: web2py-db
networks:
web2py-net:
ipv4_address: 172.25.0.24
web2py-adminer:
build:
context: .
dockerfile: web2py-adminer
container_name: web2py-adminer
ports:
- "8080:8080"
networks:
web2py-net:
ipv4_address: 172.25.0.25
networks:
web2py-net:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
volumes:
applications:

View File

@@ -1,56 +0,0 @@
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-rocket-ssl --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-nginx --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-db --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-adminer --format="{{.ID}}"))
docker network rm web2py-net
#docker network create web2py-net
docker network create --subnet=172.25.0.0/16 web2py-net
docker build -t web2py-rocket-ssl -f web2py-rocket-ssl .
docker build -t web2py-nginx -f web2py-nginx .
docker build -t web2py-db -f web2py-db .
docker build -t web2py-adminer -f web2py-adminer .
docker run -d --net web2py-net -v applications:/home/web2py/web2py/applications -p 443:443 --name web2py-rocket-ssl --ip 172.25.0.22 web2py-rocket-ssl
# docker exec -it web2py-rocket-ssl bash
sleep 2
ping -c1 -n 172.25.0.22
docker run --net web2py-net busybox ping -c1 -n web2py-rocket-ssl
echo "------------------------------------------------------------------"
curl -I 172.25.0.22:443
docker run -d --net web2py-net --name web2py-nginx --ip 172.25.0.23 web2py-nginx
# docker exec -it web2py-nginx bash
sleep 2
ping -c1 -n 172.25.0.23
docker run --net web2py-net busybox ping -c1 -n web2py-nginx
echo "------------------------------------------------------------------"
curl -I 172.25.0.23
docker run -d --net web2py-net --name web2py-db --ip 172.25.0.24 web2py-db
# docker exec -it web2py-db bash
sleep 2
ping -c1 -n 172.25.0.24
docker run --net web2py-net busybox ping -c1 -n web2py-db
echo "------------------------------------------------------------------"
curl -I 172.25.0.24
docker run -d --net web2py-net -p 8080:8080 --name web2py-adminer --ip 172.25.0.25 web2py-adminer
# docker exec -it web2py-adminer bash
sleep 2
ping -c1 -n 172.25.0.25
docker run --net web2py-net busybox ping -c1 -n web2py-adminer
echo "------------------------------------------------------------------"
curl -I 172.25.0.25
docker network ls
docker network inspect web2py-net
docker volume ls
docker volume inspect applications
docker ps -a
docker ps

View File

@@ -1,20 +0,0 @@
upstream gunicorn {
#server 172.25.0.22:443 fail_timeout=0;
server web2py-rocket-ssl:443 fail_timeout=0;
}
server {
#listen 172.25.0.23:80 default_server;
listen web2py-nginx:80 default_server;
location / {
try_files $uri @proxy_to_gunicorn;
}
location @proxy_to_gunicorn {
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://gunicorn;
}
}

View File

@@ -1,3 +0,0 @@
FROM adminer:latest
EXPOSE 8080

View File

@@ -1,9 +0,0 @@
#FROM mariadb:latest
#FROM mysql:latest
#FROM percona:latest
FROM postgres:latest
#FROM mongo:latest
#FROM couchdb:latest
ENV MYSQL_ROOT_PASSWORD=example \
POSTGRES_PASSWORD=example

View File

@@ -1,10 +0,0 @@
FROM nginx:latest
COPY ./w2p.conf /etc/nginx/conf.d/
RUN apt update
RUN apt-get install curl -y
EXPOSE 80
CMD nginx -g "daemon off;"

View File

@@ -1,20 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget openssl && \
pip install --upgrade pip && \
pip install virtualenv CouchDB pg8000 pymongo PyMySQL
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /web2py/applications/examples && \
cd /web2py && \
openssl genrsa 1024 > web2py.key && chmod 400 web2py.key && \
openssl req -new -x509 -nodes -sha1 -days 1780 -subj '/C=c/ST=st/L=l/O=o/OU=ou/CN=cn.com' -key web2py.key > web2py.crt && \
openssl x509 -noout -fingerprint -text < web2py.crt > web2py.info && \
chmod 755 -R /web2py
WORKDIR /web2py
EXPOSE 443
CMD python /web2py/web2py.py --nogui --no-banner -a 'a' -c web2py.crt -k web2py.key -i 0.0.0.0 -p 443

View File

@@ -1,61 +0,0 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/App/web2py-rocket-ssl-nginx-memcached
chmod 775 run.sh
./run.sh
# Docker Compose
pip install docker-compose
cd /Docker/App/web2py-rocket-ssl-nginx-memcached
docker-compose up -d
docker-compose ps
docker network ls
docker network inspect root_default
docker volume ls
docker volume inspect root_applications
# Docker Stack
docker swarm init --advertise-addr $(hostname -i)
docker stack deploy -c docker-compose.yml web2py-rocket-ssl-nginx-memcached
docker stack ls
docker stack ps web2py-rocket-ssl-nginx-memcached
docker stack services web2py-rocket-ssl-nginx-memcached
# Shell (Copy the content of the file into this scaffolding shell and replace the variable text $ with \$ )
cat << EOF > docker-compose.yml
EOF
cat docker-compose.yml
cat << EOF > run.sh
EOF
cat run.sh
cat << EOF > w2p.conf
EOF
cat w2p.conf
cat << EOF > web2py-memcached
EOF
cat web2py-memcached
cat << EOF > web2py-nginx
EOF
cat web2py-nginx
cat << EOF > web2py-rocket-ssl
EOF
cat web2py-rocket-ssl
chmod 755 run.sh
./run.sh
docker-compose up -d
docker-compose ps

View File

@@ -1,43 +0,0 @@
version: '3.1'
services:
web2py-rocket-ssl:
build:
context: .
dockerfile: web2py-rocket-ssl
container_name: web2py-rocket-ssl
ports:
- "443:443"
networks:
web2py-net:
ipv4_address: 172.25.0.22
volumes:
- applications:/home/web2py/web2py/applications
web2py-nginx:
build:
context: .
dockerfile: web2py-nginx
container_name: web2py-nginx
networks:
web2py-net:
ipv4_address: 172.25.0.23
web2py-memcached:
build:
context: .
dockerfile: web2py-memcached
container_name: web2py-memcached
networks:
web2py-net:
ipv4_address: 172.25.0.24
networks:
web2py-net:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
volumes:
applications:

View File

@@ -1,45 +0,0 @@
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-rocket-ssl --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-nginx --format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=web2py-memcached --format="{{.ID}}"))
docker network rm web2py-net
#docker network create web2py-net
docker network create --subnet=172.25.0.0/16 web2py-net
docker build -t web2py-rocket-ssl -f web2py-rocket-ssl .
docker build -t web2py-nginx -f web2py-nginx .
docker build -t web2py-memcached -f web2py-memcached .
docker run -d --net web2py-net -v applications:/home/web2py/web2py/applications -p 443:443 --name web2py-rocket-ssl --ip 172.25.0.22 web2py-rocket-ssl
# docker exec -it web2py-rocket-ssl bash
sleep 2
ping -c1 -n 172.25.0.22
docker run --net web2py-net busybox ping -c1 -n web2py-rocket-ssl
echo "------------------------------------------------------------------"
curl -I 172.25.0.22:443
docker run -d --net web2py-net --name web2py-nginx --ip 172.25.0.23 web2py-nginx
# docker exec -it web2py-nginx bash
sleep 2
ping -c1 -n 172.25.0.23
docker run --net web2py-net busybox ping -c1 -n web2py-nginx
echo "------------------------------------------------------------------"
curl -I 172.25.0.23
docker run -d --net web2py-net --name web2py-memcached --ip 172.25.0.24 web2py-memcached
# docker exec -it web2py-memcached bash
sleep 2
ping -c1 -n 172.25.0.24
docker run --net web2py-net busybox ping -c1 -n web2py-memcached
echo "------------------------------------------------------------------"
curl -I 172.25.0.24
docker network ls
docker network inspect web2py-net
docker volume ls
docker volume inspect applications
docker ps -a
docker ps

View File

@@ -1,20 +0,0 @@
upstream gunicorn {
#server 172.25.0.22:443 fail_timeout=0;
server web2py-rocket-ssl:443 fail_timeout=0;
}
server {
#listen 172.25.0.23:80 default_server;
listen web2py-nginx:80 default_server;
location / {
try_files $uri @proxy_to_gunicorn;
}
location @proxy_to_gunicorn {
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://gunicorn;
}
}

View File

@@ -1 +0,0 @@
FROM memcached:latest

View File

@@ -1,10 +0,0 @@
FROM nginx:latest
COPY ./w2p.conf /etc/nginx/conf.d/
RUN apt update
RUN apt-get install curl -y
EXPOSE 80
CMD nginx -g "daemon off;"

View File

@@ -1,20 +0,0 @@
FROM alpine:latest
RUN apk add --no-cache python py-pip py-setuptools unzip wget openssl && \
pip install --upgrade pip && \
pip install virtualenv
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o web2py_src.zip && \
rm -rf /web2py/applications/examples && \
cd /web2py && \
openssl genrsa 1024 > web2py.key && chmod 400 web2py.key && \
openssl req -new -x509 -nodes -sha1 -days 1780 -subj '/C=c/ST=st/L=l/O=o/OU=ou/CN=cn.com' -key web2py.key > web2py.crt && \
openssl x509 -noout -fingerprint -text < web2py.crt > web2py.info && \
chmod 755 -R /web2py
WORKDIR /web2py
EXPOSE 443
CMD python /web2py/web2py.py --nogui --no-banner -a 'a' -c web2py.crt -k web2py.key -i 0.0.0.0 -p 443

Some files were not shown because too many files have changed in this diff Show More