Compare commits

..

194 Commits

Author SHA1 Message Date
mdipierro
d93a13ca46 restoring commented tests 2019-01-01 22:13:54 -08:00
mdipierro
7216003eb6 to_native missing, why this was not failing locally 2019-01-01 22:10:53 -08:00
mdipierro
e16becb6a9 fixed pre-existing bug in handling delimiters in templates 2019-01-01 21:51:29 -08:00
mdipierro
ca6014e6e2 fixed another import in pydal.validators 2019-01-01 20:47:48 -08:00
mdipierro
64315dac4a fixed missed variable 2019-01-01 20:42:21 -08:00
mdipierro
fed82e0007 more flexibility in template 2019-01-01 20:37:11 -08:00
mdipierro
174c1fb31d fixed template reader 2019-01-01 20:34:17 -08:00
mdipierro
089013c40e added missing import 2019-01-01 18:39:09 -08:00
mdipierro
5e0f6c19bf fixed print in template 2019-01-01 18:28:24 -08:00
mdipierro
1fff3fc237 fixed get_digest in pydal 2019-01-01 18:10:03 -08:00
mdipierro
32a8a15187 fixed import of validators 2019-01-01 17:39:50 -08:00
mdipierro
b42a3a968f fixed more imports 2019-01-01 17:18:25 -08:00
mdipierro
d3666ee79a fixed scheduler import 2019-01-01 16:54:17 -08:00
mdipierro
cfa0d742fc fixed py3 imports in pydal 2019-01-01 16:32:37 -08:00
mdipierro
b3d92e8c7d ipaddress 2019-01-01 16:24:25 -08:00
mdipierro
e8860233a0 moved scheduler and validator into pydal 2019-01-01 16:01:04 -08:00
mdipierro
019cad9640 modular template 2019-01-01 15:09:06 -08:00
mdipierro
cef31f1277 fixed submodule reference 2018-12-09 19:25:57 -08:00
mdipierro
040966850c fixed submodule reference 2018-12-09 19:08:52 -08:00
mdipierro
79b2685fba fixed autocomplete widget feature, thanks Paolo 2018-12-09 19:02:33 -08:00
mdipierro
a87ee9a966 changed pydal 2018-12-09 18:59:46 -08:00
mdipierro
3ee6ddb081 allow 0 to be an id, thanks Paolo 2018-12-09 18:53:45 -08:00
mdipierro
4b587c45df Merge pull request #2061 from Faelysse/master
[Py3] Open shell executed files in binary mode, fixes #2060
2018-12-05 20:49:48 -08:00
mdipierro
134d9a11c8 Merge pull request #2059 from erbalito/master
resolves #2058
2018-12-05 20:49:16 -08:00
Faelysse
08f04814ba Open shell executed files in binary mode, fixes #2060
Non-ASCII characters in executed files caused a crash, this fixes such
behaviour.
2018-12-03 16:14:05 +01:00
erbalito
178f48799a Merge branch 'master' into master 2018-11-26 11:46:59 -03:00
erbalito
109206e721 Merge pull request #1 from erbalito/erbalito-patch-1
fixes #2058
2018-11-26 11:43:38 -03:00
erbalito
9d8fce0687 fixes #2058
I've modified redis_cache.py to be able to optionally provide an application name to RedisCache constructor. This makes possible to share cache between different web2py applications if needed.
2018-11-21 09:40:19 -03:00
mdipierro
5368a14c43 Merge pull request #2054 from vinyldarkscratch/validators/image_aspect_ratio
Add aspect ratio to IS_IMAGE() validator
2018-11-18 11:09:52 -08:00
mdipierro
f119f1fcb2 Merge pull request #2053 from boriscougar/patch-1
redis_scheduler failing
2018-11-18 11:09:26 -08:00
mdipierro
c52e75624c Merge pull request #2055 from erbalito/patch-1
Update redis_cache.py to allow sharing cache between applications
2018-11-18 11:06:20 -08:00
erbalito
66f6549817 Update redis_cache.py to allow sharing cache between different applications
I'm not sure if this would help someone else. I've always had this scenario where some of my web2py applications share the models, and therefore, need to share the cache (I use Redis). In the past I've asked if there was any possibility to share cache between applications, but I got no answers:
https://groups.google.com/forum/#!searchin/web2py/share$20cache$20application%7Csort:date/web2py/iNCzMq8ADnw/ufyPBWajBQAJ

Anyway, I've noticed that I could make a simple change to redis_cache.py to achieve what I was looking for: I've added the optional argument "application" to RedisCache(). If you inspect the RedisCache() code, you will notice that previously it was forced to use current.request.application for the instance_name. With this simple change I did, it's possible to provide an application name to the RedisCache() constructor.

This has worked like a charm for my specific scenario, and I think I can say that it has backwards compatibility. Still, if this proposal isn't accepted, I would like to hear about some alternative to share cache between applications. Thanks!
2018-11-14 12:47:04 -03:00
Vinyl Darkscratch
62df950f50 Add aspect ratio validation tests 2018-11-03 21:17:13 -08:00
Vinyl Darkscratch
7318d28f1a Add aspect ratio to IS_IMAGE() validator 2018-11-03 21:06:43 -08:00
Boris Aramis Aguilar Rodríguez
a79ad25001 redis_scheduler failing
redis_scheduler failed when calculating next_run_time (method total_seconds() belongs to timedelta)
2018-11-01 15:04:22 -06:00
mdipierro
bf27c8c394 Merge pull request #2048 from timnyborg/patch-3
Allow custom json encoder
2018-11-01 08:24:53 -07:00
mdipierro
bbaf151f25 Merge pull request #2047 from kvanzuijlen/fix_issues_for_python3
'unique_key' shouldn't be saved as bytes
2018-11-01 08:24:27 -07:00
mdipierro
41448926cb Merge pull request #2045 from veiko99/traceback_errors
Fixes python3 traceback errors
2018-11-01 08:23:02 -07:00
mdipierro
2fa6b644ad Merge pull request #2043 from timnyborg/patch-2
fix selectable breaking with custom formstyle
2018-11-01 08:21:42 -07:00
mdipierro
9824ead2e7 Merge pull request #2041 from rif/master
fix recaptcha2 for python3
2018-11-01 08:21:11 -07:00
mdipierro
eefdd6f887 Merge pull request #2040 from d3im/master
fix plugin.html view to work with python3
2018-11-01 08:19:54 -07:00
mdipierro
623bbc4349 Merge pull request #2034 from timnyborg/patch-1
correct rendering of jsonrpcerrors
2018-11-01 08:19:32 -07:00
mdipierro
f307d32288 Merge pull request #2033 from cbenhagen/patch-1
Fix basic_auth with Python 3
2018-11-01 08:19:00 -07:00
mdipierro
eaa34a7f9f Merge pull request #2032 from rayluo/generic-csv
Create generic.csv
2018-11-01 08:18:35 -07:00
Tim Nyborg
77a5c01ac9 Allow custom json encoder
This lets an application use a custom JSONEncoder when making jsonrpc calls (to automatically handle, say, serialization of datetime, or Decimal, or custom classes).

e.g.:
    
import json, datetime, decimal
class ExtendedEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, datetime.datetime):
            return obj.isoformat()
        if isinstance(obj, decimal.Decimal):
            return str(obj)
        return super(ExtendedEncoder, self).default(obj)
    
api = ServerProxy(address, version='2.0', encoder=ExtendedEncoder)
2018-10-29 15:16:28 +00:00
Koen van Zuijlen
ec41d49454 'unique_key' shouldn't be saved as bytes 2018-10-29 13:47:35 +01:00
Koen van Zuijlen
2be479fc9f Merge branch 'master' into fix_issues_for_python3 2018-10-29 13:47:06 +01:00
Veiko Aasa
5887e43248 Fixes #1829 2018-10-20 13:58:41 +03:00
Veiko Aasa
c5e1ddea20 Fixes #1998 2018-10-20 13:54:04 +03:00
Tim Nyborg
aca4947927 fix selectable breaking with custom formstyle
the recently added elif results in a 'function is not iterable' exception if you have a custom formstyle function
2018-10-19 16:36:13 +01:00
Radu Ioan Fericean
7de0a3b53f fix recaptcha2 for python3 2018-10-18 16:27:15 +03:00
d3im
508e96c486 fix plugin.html view to work with python3 2018-10-18 09:20:29 +02:00
Tim Nyborg
5d9f17d414 correct rendering of jsonrpcerrors
Currently, JSONRPCErrors get spit into a console or ticket one line per character (due to the  '\n'.join(data) applying to a string).  This fixes that issue while preserving new lines for arrays.
2018-10-09 10:51:38 +01:00
Ben Hagen
a5d7827fc7 Fix basic_auth with Python 3
`base64.b64decode` returns bytes and thus the separator needs to be a bytes-like object.
2018-10-08 15:47:13 +02:00
Ray Luo
313f7292f8 Create generic.csv 2018-10-07 01:02:50 -07:00
mdipierro
95709e582d R-2.17.2 2018-10-06 11:41:01 -07:00
mdipierro
755275f8ef R-2.17.2 2018-10-06 11:36:23 -07:00
mdipierro
84a33f1a50 Merge branch 'master' of github.com:web2py/web2py 2018-10-06 11:35:29 -07:00
mdipierro
ca5c79c980 R-2.17.2 2018-10-06 11:35:12 -07:00
mdipierro
09e53f495d Merge pull request #2031 from leonelcamara/patch-22
Use export columns as is supposed instead of selectable ones
2018-10-06 11:31:14 -07:00
mdipierro
4ede2de037 Merge pull request #2030 from leonelcamara/patch-21
Show readable fields with a default in create form
2018-10-06 11:30:14 -07:00
Leonel Câmara
800bd53870 Use export columns as is supposed instead of selectable ones
Fixes #2014
2018-10-04 12:43:49 +01:00
Leonel Câmara
4c87932f06 Show readable fields with a default in create form
Fixes #2006 
This is a backwards compatibility fix.
2018-10-03 12:53:58 +01:00
mdipierro
8276b30c32 Merge pull request #2026 from nicozanf/patch-1
Python 3 compatibility + fixed link for cookbook
2018-09-27 22:19:37 -07:00
mdipierro
6f87a20e26 Merge pull request #2025 from leonelcamara/patch-20
Python 3 compatibility
2018-09-27 22:19:20 -07:00
mdipierro
41162c794e Merge pull request #2022 from leonelcamara/patch-19
Fixes #2020
2018-09-27 22:18:22 -07:00
Nico Zanferrari
6034368364 Python 3 compatibility + fixed link for cookbook 2018-09-27 21:16:05 +02:00
Leonel Câmara
19c41b308d Update languages.py 2018-09-27 17:57:24 +01:00
Leonel Câmara
f5638c8f6b Python 3 has no cmp function in sorted 2018-09-27 16:22:48 +01:00
Leonel Câmara
904ca403a2 Python 3 compatibility
Fixes #2024
2018-09-27 01:53:08 +01:00
Leonel Câmara
d244c34282 Fixes #2020 2018-09-24 22:04:04 +01:00
mdipierro
1715bccac4 Merge pull request #2019 from hrother/sqlform_factory_validators
Testcase for #2007
2018-09-23 10:44:37 -07:00
mdipierro
abf3ca54bf Merge pull request #2018 from leonelcamara/fix726
Fixes #726
2018-09-22 18:48:21 -07:00
mdipierro
2440932579 Merge pull request #2017 from leonelcamara/fixfactoryvalidators
Fixes #2007
2018-09-22 18:47:51 -07:00
mdipierro
02e14d91e1 Merge pull request #2016 from inpos/master
Python 3 compat
2018-09-22 18:44:25 -07:00
mdipierro
e9547d219a Merge pull request #2008 from leonelcamara/samesite
Add SameSite support
2018-09-22 18:43:38 -07:00
Holger Rother
70bb497b96 Simplify testcase 2018-09-22 09:55:26 +02:00
Holger Rother
398fc6de37 Testcase for #2007 2018-09-21 07:58:12 +02:00
Leonel Câmara
50692a4fd3 Fixes #726 2018-09-20 18:59:41 +01:00
Leonel Câmara
11b441b777 Make SameSite=Lax the default for all web2py apps 2018-09-20 13:02:09 +01:00
Leonel Câmara
62f5372876 Fixes #2007 2018-09-20 12:47:05 +01:00
Бородин Роман
fba90d31f4 Error 'dict_items += list' when try to save code-editor settings 2018-09-19 11:06:04 +03:00
Бородин Роман
9375ea7378 TypeError when try to disable appliance 2018-09-19 10:57:57 +03:00
mdipierro
e697bdaf90 Merge branch 'master' of github.com:web2py/web2py 2018-09-17 21:36:54 -07:00
mdipierro
7bddd67a61 fixed basestring in template.py filenames, thanks appjarbiz 2018-09-17 21:32:41 -07:00
mdipierro
93c05240b7 Merge pull request #2009 from misl6/master
Fixes request_reset_password w/ custom userfield
2018-09-17 06:29:16 -07:00
mdipierro
2f1db7dfa2 Merge pull request #2005 from Faelysse/master
HTTP header date made independent of locale, fixes #1997
2018-09-17 06:24:32 -07:00
mdipierro
0389a45034 Merge pull request #2004 from DonaldMcC/issue/2003
Issue/2003
2018-09-17 06:23:34 -07:00
mdipierro
ec53580a76 Merge pull request #2002 from JusticeN/patch-2
changing the anyserver.py to make it run with py3
2018-09-17 06:22:45 -07:00
Mirko Galimberti
09c8b5eced skip requires on custom userfield 2018-09-07 10:23:07 +02:00
Leonel Câmara
928fd364cf Add SameSite support 2018-09-06 16:16:44 +01:00
Mirko Galimberti
55a2f4a6b2 Fixes request_reset_password w/ custom userfield 2018-09-06 14:58:03 +02:00
Faelysse
6e0da9cea7 HTTP header date made independent of locale, fixes #1997 2018-09-06 14:46:07 +02:00
Donald McClymont
9364aa2036 Support for compiled apps on python 3.7 and above - marshal_header_size increased to 16 for those cases - tested by compiling and running welcome app on py 2.7,3.6 and 3.7 2018-09-05 23:34:05 +01:00
Donald
48806ccd8f Merge pull request #1 from web2py/master
merge my branch forward hopefully
2018-09-05 22:52:36 +01:00
JusticeN
80582daaa0 changing the anyserver.py to make it run with py3
actually fixing the issue #1993 i have created.
i tested it successfuly with the command python3 anyserver.py -s tornado -i 127.0.0.1 -p 80 -l
2018-09-05 14:17:33 +02:00
mdipierro
33c6dd9656 fixed broken connection in scheduler, thanks Bart 2018-09-02 10:45:06 -07:00
mdipierro
1c8790271d Merge pull request #1995 from wojtek555/issue/1974
Glyphicons replaced with awasome icons in list widget, fix #1974
2018-09-02 10:27:04 -07:00
mdipierro
f8cba1e5c4 Merge pull request #1992 from jvanbraekel/master
Update the style of SQLgrid select actions
2018-09-02 10:26:40 -07:00
mdipierro
f2aacd93c8 Merge pull request #1991 from Faelysse/master
Python3 redis compatibility
2018-09-02 10:25:59 -07:00
mdipierro
02b02f73bd Merge pull request #1989 from nicozanf/patch-2
partially restore original layout for Welcome page
2018-09-02 10:25:25 -07:00
mdipierro
af69716bf0 Merge pull request #1982 from kvanzuijlen/fix_issues_for_python3
Fixed KeyError that occured when trying to retrieve column 'session_data'
2018-09-02 10:23:36 -07:00
mdipierro
433ef09d2c Merge pull request #1924 from blackthorne/master
added task broadcasting for workers within a group
2018-09-02 10:22:18 -07:00
mdipierro
2859994bbe Merge branch 'master' of github.com:web2py/web2py 2018-09-02 10:21:53 -07:00
mdipierro
5cf2c9696d Merge pull request #1994 from JusticeN/patch-1
make make_min_web2py.py run for python3
2018-09-02 10:19:46 -07:00
mdipierro
b517282238 Merge pull request #1984 from amerikan/master
Adds the auto-fill Github issues templates
2018-09-02 10:19:06 -07:00
mdipierro
842a8d613b Merge pull request #1979 from kelvinspencer/patch-1
Update web2py_bootstrap.js
2018-09-02 10:18:02 -07:00
mdipierro
2226862ea9 Merge pull request #1976 from nicozanf/patch-1
Python 3 compatibility clarification
2018-09-02 10:17:14 -07:00
mdipierro
e87ef4bc3a fixed SimpleXMLRPCDispatcher, thanks Leonel 2018-09-02 10:15:01 -07:00
Wojciech Barcik
b28cc5b5c3 Glyphicons replaced with awasome icons in list widget, fix #1974 2018-08-29 19:01:22 +02:00
JusticeN
ef4e465222 make make_min_web2py.py run for python3
i tried to minify the web2py server and this script was not able to run with python3.5.
So i change it.
2018-08-25 13:45:46 +02:00
jvanbraekel
1cdda4f7f6 Merge https://github.com/jvanbraekel/web2py 2018-08-22 17:53:27 +02:00
jvanbraekel
de7aeceac8 Merge pull request #2 from web2py/master
merge origin changes
2018-08-22 17:50:14 +02:00
jvanbraekel
e04d16bdc1 Align SQLForm.grid selec action left and insure compatibility with bootsrap 4 2018-08-22 17:21:31 +02:00
Faelysse
c5547091cf Python3 redis compatibility
Redis expects int, Python3 <int>/<int> operation returns floatgit
2018-08-17 16:35:54 +02:00
Nico Zanferrari
83abe91e3a restore original background image 2018-08-16 18:38:55 +02:00
Nico Zanferrari
4f29733fae restore dark navbar 2018-08-16 18:31:13 +02:00
Erik Montes
6b8ccff2a4 Create feature_request.md 2018-08-13 23:36:16 -07:00
Erik Montes
e7fee6a417 Create bug_report.md 2018-08-13 23:34:22 -07:00
mdipierro
63972386c2 fixed limitby in sqlhtml grid, thanks Paolo 2018-08-12 10:56:58 -07:00
Koen van Zuijlen
5c626c6d95 Fixed KeyError that occured when trying to retrieve column 'session_data' 2018-08-10 16:06:40 +02:00
Kelvin Spencer
46b8ad3fdd Update web2py_bootstrap.js
This allows dropdown menu items to be open in the target specified if it exists without changing main/top window
2018-08-08 08:58:15 -05:00
Nico Zanferrari
7111b3dcb2 Python 3 compatibility clarification 2018-08-08 00:13:23 +02:00
mdipierro
285013a64a version 2.17.1 2018-08-05 17:57:11 -07:00
mdipierro
bcf288f55d fixed pydal 18.08 2018-08-05 17:56:03 -07:00
mdipierro
88c98cad5c fixed pydal 18.08 2018-08-05 17:22:23 -07:00
mdipierro
2203e0e49f Merge pull request #1970 from web2py/jwt_allow_decorator_fix
Jwt allow decorator fix
2018-08-05 17:21:17 -07:00
mdipierro
540bda993f Merge pull request #1967 from misl6/master
Fixes login_bare + register_bare w/ custom login_userfield
2018-08-05 17:19:34 -07:00
mdipierro
65b9c9ce17 Merge pull request #1960 from daniellibonati/master
Proposed Fix for #1959 "Can't initiate simplejsonrpc service object"
2018-08-05 17:18:29 -07:00
mdipierro
5f9a097505 Merge pull request #1956 from marian-vignau/master
Proposed fix to solve crash on markdown2 module
2018-08-05 17:18:00 -07:00
mdipierro
b33efddb77 Merge pull request #1954 from gonguinguen/patch-3
Catch KeyError in download function
2018-08-05 17:17:28 -07:00
mdipierro
577c45d183 Merge pull request #1951 from yamandu/issue/1950
correction to generate options also for fields generated with…
2018-08-05 17:16:47 -07:00
mdipierro
077eb4263d Merge pull request #1946 from leonelcamara/patch-17
Import urllib stuff from _compat
2018-08-05 17:14:43 -07:00
mdipierro
2904dae2c3 Merge pull request #1945 from leonelcamara/patch-16
Import urllib stuff from _compat
2018-08-05 17:14:29 -07:00
mdipierro
225380d00b Merge pull request #1944 from leonelcamara/patch-15
PY3 compatibility
2018-08-05 17:14:16 -07:00
mdipierro
fc295bb617 Merge pull request #1943 from leonelcamara/patch-14
fixed XML import
2018-08-05 17:14:03 -07:00
mdipierro
6438200923 Merge pull request #1942 from jvanbraekel/master
Use request_reset_password +  PDF and TSV exports
2018-08-05 17:13:45 -07:00
mdipierro
8c7955e107 Merge pull request #1937 from sugizo/add_docker
add another server in some os (docker)
2018-08-05 17:12:12 -07:00
jvanbraekel
68284be7b0 Fix pdf export , make it python3 compatible, Fix markmin2latex import 2018-08-02 11:04:14 +02:00
jvanbraekel
0d8dc294e9 Fix tsv ext, add tsv hidden exporter , use csv exporter for tsv export 2018-08-02 10:59:51 +02:00
jvanbraekel
cfe9c74eb1 Merge pull request #1 from web2py/master
web2py origin changes
2018-08-01 11:12:32 +02:00
jvanbraekel
e73029ce37 fix markmin2latex import
Add full path name in markmin2latex import
2018-07-31 10:13:21 +02:00
Mirko Galimberti
a053df7b75 Adds type error for handling NoneType exceptions 2018-07-27 12:03:39 +02:00
Mirko Galimberti
a22aac1e65 Fixes ipython console listindex error 2018-07-27 11:18:24 +02:00
Michele Comitini
6f2be48e25 generate HTTP error code also if jwt token parameter is missing in request 2018-07-26 20:01:38 +02:00
Gautham Pai
39dd86d6fb Raise an error only if required is True and token is not present 2018-07-24 17:40:15 +05:30
Gautham
bc59d58a3e Fixing a bug - the allows_jwt method does NOT throw any error if a token is not found at all.
This could cause potential security issues as developers decorate their methods with @allows_jwt and then not pass a token and the method allows the call.

Signed-off-by: Gautham <buzypi@gmail.com>
2018-07-24 15:12:20 +05:30
Mirko Galimberti
1aab089205 Fixes login_bare + register_bare w/ custom login_userfield 2018-07-19 17:13:38 +02:00
Daniel Libonati
ea1d9acfad Fix #1959 2018-06-30 21:55:16 -03:00
mavignau@gmail.com
90222d7867 Fixed crash encountered in markdown2 module 2018-06-19 21:25:55 -03:00
mavignau@gmail.com
e6b7388758 Fix proposed to crash in linux on import markdown module 2018-06-19 21:18:33 -03:00
mavignau@gmail.com
52672530b7 Fix proposed to crash in linux on import markdown module 2018-06-19 21:13:53 -03:00
Lisandro
911cf430a9 Catch KeyError in download function
This change is necessary to avoid an error ticket when you delete an upload field from a table (and also from the model definition). In those cases, requests to old URLs will throw a KeyError. With this fix, those requests return 404 as expected.

Also, catching AttributeError is still necessary for the situation when the table is removed entirely. If an old request come in, that sentence will throw an AttributeError, that will be catched properly, and request will return 404.
2018-06-15 08:30:44 -03:00
mdipierro
d7624b95f8 fixed a typo in validators, thanks Paolo 2018-06-15 05:08:12 +02:00
mdipierro
09271bff5f simplfied a test, thanks Paolo 2018-06-15 05:07:28 +02:00
mdipierro
f239882d32 fxed various sqlhtml bugs, thanks Paolo 2018-06-15 05:06:49 +02:00
Carlos Costa
9076053f7e correction to generate options also for fields generated with requires=IS_IN_SET or any field with options attribute 2018-06-12 19:55:25 -03:00
Leonel Câmara
c97cac19f0 Import urllib stuff from _compat 2018-06-08 10:54:57 +01:00
Leonel Câmara
b5e8cad672 Import urllib stuff from _compat 2018-06-08 10:45:36 +01:00
Leonel Câmara
d502275fc8 PY3 compatibility 2018-06-08 10:41:13 +01:00
Leonel Câmara
98c70d8a70 fixed XML import 2018-06-07 23:17:07 +01:00
jvanbraekel
b7ba4a15f1 Update request_reset_password in user.htlm
Update /user/request_reset_password to user/retrieve_password and linked settings option.
According to https://web2py.readthedocs.io/en/latest/_modules/gluon/tools.html#Auth 'request_reset_password' should not even be exposed anymore. (but this is still the case).
2018-06-07 16:14:52 +02:00
sugizo
3585ef828e add some of server (diesel, eventlet, gevent, paste, twisted, waitress, wsgiref) in some os 2018-06-02 06:53:31 +07:00
mdipierro
14083907e5 Merge pull request #1936 from sugizo/add_docker
add docker
2018-06-01 13:55:51 -05:00
mdipierro
c358d2a851 better validators and comments, thanks Paolo 2018-06-01 13:34:27 -05:00
mdipierro
319490edc1 fixed one more test 2018-06-01 13:19:35 -05:00
mdipierro
7fce2d04af fixed tests for IS_LIST_OF 2018-06-01 12:56:45 -05:00
mdipierro
c3f11dc976 Merge pull request #1935 from sugizo/fix_anyserver_cherrypy
anyserver.py with cherrypy
2018-06-01 12:45:21 -05:00
mdipierro
246b5293e5 Merge pull request #1933 from jvanbraekel/master
Update layout navbar for centering navbar items
2018-06-01 12:44:50 -05:00
mdipierro
d383da31c8 Merge pull request #1928 from umbromancer/master
Added missing config section in Scheduler
2018-06-01 12:44:20 -05:00
mdipierro
eaaa9203f7 Merge pull request #1927 from alexandremasbr/fixes_layout_to_translate
fixes allow translate strings at views/default/user.html
2018-06-01 12:43:42 -05:00
mdipierro
7176524e4f Merge pull request #1926 from alexandremasbr/language_pt_br_corrections
fixes in languages/pt-br.py
2018-06-01 12:43:19 -05:00
mdipierro
e740451b69 Merge pull request #1923 from robinvandernoord/patch-1
Changed file to open
2018-06-01 12:41:40 -05:00
mdipierro
4d9eaf1ac4 Merge pull request #1922 from cccaballero/user_page_bottom_margin
Add bottom margin on welcome user page
2018-06-01 12:41:18 -05:00
mdipierro
dfd5752814 Merge pull request #1921 from leonelcamara/patch-13
Fixes #1918
2018-06-01 12:40:58 -05:00
mdipierro
d2de59c05d Merge pull request #1917 from cccaballero/NEWINSTALL_file_unlink
#1911 NEWINSTALL file unlink issue
2018-06-01 12:40:28 -05:00
sugizo
ba917605ac anyserver can use cherrypy issue on https://github.com/web2py/web2py/issues/1934 2018-06-01 14:51:14 +07:00
Julien Van Braekel
98c2788203 Update layout navbarfor bootstrap 4 2018-05-31 09:32:11 +02:00
mdipierro
8d865f1c5f better error handing in IS_LIST_OF, thanks Paolo 2018-05-24 11:17:49 -05:00
umbromancer
61be442614 Added missing config section in Scheduler 2018-05-14 11:38:55 +01:00
mdipierro
bb338ef19c added acknowledgement to Paolo Pastori 2018-05-13 20:15:30 -05:00
Alexandre Andrade
c313611e0d fixes in languages/pt-br.py 2018-05-11 02:38:59 +00:00
Alexandre Andrade
716c697a60 fixes allow translate strings at views/default/user.html 2018-05-11 02:31:14 +00:00
d1ed9ab88c fixes in languages/pt-br.py 2018-05-11 02:12:17 +00:00
Francisco Ribeiro
32eb1bc27d added task broadcasting for workers within a group 2018-05-09 04:45:08 +01:00
Robin
16e3e7c35e Changed file to open
file is deprecated in python 3, but open works on both. So for compatibility I would suggest to use open over file.
2018-05-08 11:00:35 +02:00
Carlos Cesar Caballero Díaz
9e794b1929 Add bottom margin on welcome user page container for properly shadow visualization 2018-05-07 13:56:00 -04:00
mdipierro
ae60debc90 fixed up export 2018-05-06 15:09:11 -05:00
Leonel Câmara
18414ab8c2 Fixes #1918
Took the chance to also update the syntax from the old style "except socket.error, e:" to "except socket.error as e"
2018-05-03 17:15:53 +01:00
mdipierro
4ed36cfb1f welcome improvements 2018-05-01 16:08:40 -05:00
mdipierro
fda67e1be5 request method 2018-05-01 15:58:14 -05:00
mdipierro
4130f87c62 fixed languages.py py3 bug 2018-05-01 15:53:19 -05:00
Carlos Cesar Caballero Díaz
f50380af73 #1911 NEWINSTALL file unlink issue 2018-04-30 14:17:44 -04:00
sugizo
a3df59fceb add_docker 2018-02-05 07:06:40 +07:00
308 changed files with 8225 additions and 7113 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,3 +1,7 @@
## 2.17.1-2
- pydal 18.08
- many small bug fixes
## 2.16.1 ## 2.16.1
- pydal 17.11 - pydal 17.11
- bootstrap 4 - bootstrap 4

View File

@@ -44,7 +44,7 @@ rmfiles:
rm -rf applications/examples/uploads/* rm -rf applications/examples/uploads/*
src: src:
### Use semantic versioning ### Use semantic versioning
echo 'Version 2.16.1-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION echo 'Version 2.17.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
### rm -f all junk files ### rm -f all junk files
#make clean #make clean
# make rmfiles # make rmfiles

View File

@@ -1 +1 @@
Version 2.16.1-stable+timestamp.2018.03.08.10.23.01 Version 2.17.2-stable+timestamp.2018.10.06.11.34.06

View File

@@ -43,8 +43,8 @@ class Servers:
@staticmethod @staticmethod
def cherrypy(app, address, **options): def cherrypy(app, address, **options):
from cherrypy import wsgiserver from cheroot.wsgi import Server as WSGIServer
server = wsgiserver.CherryPyWSGIServer(address, app) server = WSGIServer(address, app)
server.start() server.start()
@staticmethod @staticmethod
@@ -212,16 +212,16 @@ def mongrel2_handler(application, conn, debug=False):
while True: while True:
if debug: if debug:
print "WAITING FOR REQUEST" print("WAITING FOR REQUEST")
# receive a request # receive a request
req = conn.recv() req = conn.recv()
if debug: if debug:
print "REQUEST BODY: %r\n" % req.body print("REQUEST BODY: %r\n" % req.body)
if req.is_disconnect(): if req.is_disconnect():
if debug: if debug:
print "DISCONNECT" print("DISCONNECT")
continue # effectively ignore the disconnect from the client continue # effectively ignore the disconnect from the client
# Set a couple of environment attributes a.k.a. header attributes # Set a couple of environment attributes a.k.a. header attributes
@@ -247,7 +247,7 @@ def mongrel2_handler(application, conn, debug=False):
environ['wsgi.input'] = req.body environ['wsgi.input'] = req.body
if debug: if debug:
print "ENVIRON: %r\n" % environ print("ENVIRON: %r\n" % environ)
# SimpleHandler needs file-like stream objects for # SimpleHandler needs file-like stream objects for
# requests, errors and responses # requests, errors and responses
@@ -282,10 +282,10 @@ def mongrel2_handler(application, conn, debug=False):
# return the response # return the response
if debug: if debug:
print "RESPONSE: %r\n" % response print("RESPONSE: %r\n" % response)
if errors: if errors:
if debug: if debug:
print "ERRORS: %r" % errors print("ERRORS: %r" % errors)
data = "%s\r\n\r\n%s" % (data, errors) data = "%s\r\n\r\n%s" % (data, errors)
conn.reply_http( conn.reply_http(
req, data, code=code, status=status, headers=headers) req, data, code=code, status=status, headers=headers)
@@ -355,8 +355,8 @@ def main():
dest='workers', dest='workers',
help='number of workers number') help='number of workers number')
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
print 'starting %s on %s:%s...' % ( print('starting %s on %s:%s...' % (
options.server, options.ip, options.port) options.server, options.ip, options.port))
run(options.server, options.ip, options.port, run(options.server, options.ip, options.port,
logging=options.logging, profiler=options.profiler_dir, logging=options.logging, profiler=options.profiler_dir,
options=options) options=options)

View File

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

View File

@@ -562,7 +562,11 @@ def enable():
os.unlink(filename) os.unlink(filename)
return SPAN(T('Disable'), _style='color:green') return SPAN(T('Disable'), _style='color:green')
else: else:
safe_open(filename, 'wb').write('disabled: True\ntime-disabled: %s' % request.now) if PY2:
safe_open(filename, 'wb').write('disabled: True\ntime-disabled: %s' % request.now)
else:
str_ = 'disabled: True\ntime-disabled: %s' % request.now
safe_open(filename, 'wb').write(str_.encode('utf-8'))
return SPAN(T('Enable'), _style='color:red') return SPAN(T('Enable'), _style='color:red')
@@ -642,7 +646,10 @@ def edit():
# show settings tab and save prefernces # show settings tab and save prefernces
if 'settings' in request.vars: if 'settings' in request.vars:
if request.post_vars: # save new preferences if request.post_vars: # save new preferences
post_vars = request.post_vars.items() if PY2:
post_vars = request.post_vars.items()
else:
post_vars = list(request.post_vars.items())
# Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings # Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings
post_vars += [(opt, 'false') for opt in preferences if opt not in request.post_vars] post_vars += [(opt, 'false') for opt in preferences if opt not in request.post_vars]
if config.save(post_vars): if config.save(post_vars):

View File

@@ -29,5 +29,14 @@ jQuery(function(){
} }
hoverMenu(); // first page load hoverMenu(); // first page load
jQuery(window).resize(hoverMenu); // on resize event jQuery(window).resize(hoverMenu); // on resize event
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); jQuery('ul.nav li.dropdown a').click(function(){
if(jQuery(this).attr("target")){
window.open(
jQuery(this).attr('href'),
jQuery(this).attr('target') // <- This is what makes it open in a new window.
);
} else {
window.location=jQuery(this).attr('href');
}
});
}); });

View File

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

View File

@@ -85,7 +85,7 @@ def deletefile(arglist):
{{=peekfile('models',m)}} {{=peekfile('models',m)}}
</span> </span>
<span class="extras"> <span class="extras">
{{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(', '.join([B(table).xml() for table in defines[m]]))}} {{if len(defines[m]):}}{{=T("defines tables")}} {{pass}}{{=XML(b', '.join([B(table).xml() for table in defines[m]]))}}
</span> </span>
</li> </li>
{{pass}} {{pass}}
@@ -118,7 +118,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
{{=peekfile('controllers',c)}} {{=peekfile('controllers',c)}}
</span> </span>
<span class="extras celled"> <span class="extras celled">
{{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}} {{if functions[c]:}}{{=T("exposes")}} {{pass}}{{=XML(b', '.join([A(f,_href=URL(a=app,c=c[:-3],f=f)).xml() for f in functions[c]]))}}
</span> </span>
</li> </li>
{{pass}} {{pass}}
@@ -145,7 +145,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</span> </span>
<span class="extras celled"> <span class="extras celled">
{{if c in extend:}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}} {{if c in extend:}}{{=T("extends")}} <b>{{=extend[c]}}</b> {{pass}}
{{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(', '.join([B(f).xml() for f in include[c]]))}} {{if include[c]:}}{{=T("includes")}} {{pass}}{{=XML(b', '.join([B(f).xml() for f in include[c]]))}}
</span> </span>
</li> </li>
{{pass}} {{pass}}

View File

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

View File

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

View File

@@ -62,16 +62,16 @@
</center> </center>
<p style="text-align:left;"> <p style="text-align:left;">
The source code version works on all supported platforms, including Linux, but it requires Python 2.6, or 2.7 (recommended). The source code version works on Windows and most Unix systems, including <b>Linux</b>, <b>BSD</b> and <b>Mac</b> . It requires Python 2.6 (no more supported), Python 2.7 (stable) or Python 3.5+ (recommended for new projects) already installed on your system.
It runs on Windows and most Unix systems, including <b>Linux</b> and <b>BSD</b>. There are also binary packages for Windows and Mac OS X. They include the Python 2.7 interpreter so you do not need to have it pre-installed.
</p> </p>
<h3>Instructions</h3> <h3>Instructions</h3>
<p>After download, unzip it and click on web2py.exe (windows) or web2py.app (osx). <p>With the binary packages, after download, just unzip it and then click on web2py.exe (windows) or web2py.app (osx).
To run from source, type:</p> If you prefer to run it from source with your own Python interpreter alreay installed, type:</p>
{{=CODE("python2.7 web2py.py", language=None, counter='>', _class='boxCode')}} {{=CODE("python web2py.py", language=None, counter='>', _class='boxCode')}}
<p>or for more info type:</p> <p>or for more info type:</p>
{{=CODE("python2.7 web2py.py -h", language=None, counter='>', _class='boxCode')}} {{=CODE("python web2py.py -h", language=None, counter='>', _class='boxCode')}}
<h3>Caveats</h3> <h3>Caveats</h3>

View File

@@ -4,7 +4,7 @@
<div class="twothirds"> <div class="twothirds">
<div class="padded"> <div class="padded">
<h3><img src="{{=URL('static/images', 'web2py_logo.png')}}"> Web Framework</h3> <h3><img src="{{=URL('static/images', 'web2py_logo.png')}}"> Web Framework</h3>
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#Security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>.</p> <p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#Security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a> (version 3 and 2.7).</p>
<table width="100%"> <table width="100%">
<tr> <tr>
<td> <td>
@@ -18,7 +18,7 @@
</a> </a>
</td> </td>
<td> <td>
<a class="noeffect" href="http://link.packtpub.com/SUlnrN"> <a class="noeffect" href="https://www.packtpub.com/web-development/web2py-application-development-cookbook">
<img src="{{=URL('static','images/book-recipes.png')}}" /> <img src="{{=URL('static','images/book-recipes.png')}}" />
</a> </a>
</td> </td>

View File

@@ -111,6 +111,7 @@
</li><li>Ovidio Marinho Falcao Neto (tests and plugin developer) </li><li>Ovidio Marinho Falcao Neto (tests and plugin developer)
</li><li>Pai (internationalization) </li><li>Pai (internationalization)
</li><li>Paolo Caruccio (SQLFORM.grid query) </li><li>Paolo Caruccio (SQLFORM.grid query)
</li><li>Paolo Pastori
</li><li>Patrick Breitenbach </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><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) </li><li>Pierre Thibault (<a href="http://code.google.com/p/neo-web2py2eclipse/">Eclipse integration</a> and custom import)

View File

@@ -22,11 +22,12 @@
'Administrative interface': 'Interface administrativa', 'Administrative interface': 'Interface administrativa',
'Ajax Recipes': 'Receitas de Ajax', 'Ajax Recipes': 'Receitas de Ajax',
'An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page', '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', '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?', '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', 'Available Databases and Tables': 'Bancos de dados e tabelas disponíveis',
'Buy this book': 'Compre o livro', 'Buy this book': 'Compre o livro',
"Buy web2py's book": 'Compre o livro do web2buy', "Buy web2py's book": 'Compre o livro do web2py',
'cache': 'cache', 'cache': 'cache',
'Cache': 'Cache', 'Cache': 'Cache',
'Cache Cleared': 'Cache limpo', 'Cache Cleared': 'Cache limpo',
@@ -82,6 +83,7 @@
'Forms and Validators': 'Formulários e Validadores', 'Forms and Validators': 'Formulários e Validadores',
'Free Applications': 'Aplicações gratuitas', 'Free Applications': 'Aplicações gratuitas',
'Graph Model': 'Graph Model', 'Graph Model': 'Graph Model',
'Grid Example': 'Exemplo de Grade',
'Group ID': 'ID do Grupo', 'Group ID': 'ID do Grupo',
'Groups': 'Grupos', 'Groups': 'Grupos',
'Hello World': 'Olá Mundo', 'Hello World': 'Olá Mundo',
@@ -106,26 +108,27 @@
'Layouts': 'Layouts', 'Layouts': 'Layouts',
'Live chat': 'Chat ao vivo', 'Live chat': 'Chat ao vivo',
'Live Chat': 'Chat ao vivo', 'Live Chat': 'Chat ao vivo',
'Log In': 'Log In', 'Log In': 'Entrar',
'login': 'Entrar', 'login': 'Entrar',
'Login': 'Autentique-se', 'Login': 'Entrar',
'logout': 'Sair', 'logout': 'Sair',
'Lost Password': 'Esqueceu sua senha?', 'Lost Password': 'Esqueceu sua senha?',
'lost password?': 'esqueceu sua senha?', 'lost password?': 'esqueceu sua senha?',
'Lost your password?': 'Esqueceu sua senha?',
'Main Menu': 'Menu Principal', 'Main Menu': 'Menu Principal',
'Manage %(action)s': 'Manage %(action)s', 'Manage %(action)s': 'Gerenciar %(action)s',
'Manage Access Control': 'Manage Access Control', 'Manage Access Control': 'Gerenciar controle de acesso',
'Manage Cache': 'Gerenciar Cache', 'Manage Cache': 'Gerenciar Cache',
'Memberships': 'Memberships', 'Memberships': 'Grupos',
'Menu Model': 'Modelo de Menu', 'Menu Model': 'Modelo de Menu',
'My Sites': 'Meus sites', 'My Sites': 'Meus sites',
'Name': 'Nome', 'Name': 'Nome',
'New Record': 'Novo Registro', 'New Record': 'Novo Registro',
'new record inserted': 'novo registro inserido', 'new record inserted': 'novo registro inserido',
'next %s rows': 'next %s rows', 'next %s rows': 'próximas %s ´linhas',
'next 100 rows': 'próximas 100 linhas', 'next 100 rows': 'próximas 100 linhas',
'No databases in this application': 'Não há bancos de dados nesta aplicação', 'No databases in this application': 'Não há bancos de dados nesta aplicação',
'Number of entries: **%s**': 'Number of entries: **%s**', 'Number of entries: **%s**': 'Número de entradas: **%s**',
'Object or table name': 'Nome do objeto do da tabela', 'Object or table name': 'Nome do objeto do da tabela',
'Online book': 'Online book', 'Online book': 'Online book',
'Online examples': 'Exemplos online', 'Online examples': 'Exemplos online',
@@ -140,35 +143,37 @@
'Plugins': 'Plugins', 'Plugins': 'Plugins',
'Powered by': 'Desenvolvido com', 'Powered by': 'Desenvolvido com',
'Preface': 'Prefácio', 'Preface': 'Prefácio',
'previous %s rows': 'previous %s rows', 'previous %s rows': '%s linhas anteriores',
'previous 100 rows': '100 linhas anteriores', 'previous 100 rows': '100 linhas anteriores',
'pygraphviz library not found': 'pygraphviz library not found', 'pygraphviz library not found': 'biblioteca pygraphviz não encontrada',
'Python': 'Python', 'Python': 'Python',
'Query:': 'Consulta:', 'Query:': 'Consulta:',
'Quick Examples': 'Exemplos rápidos', 'Quick Examples': 'Exemplos rápidos',
'RAM': 'RAM', 'RAM': 'RAM',
'RAM Cache Keys': 'RAM Cache Keys', 'RAM Cache Keys': 'RAM Cache Keys',
'Ram Cleared': 'Ram Cleared', 'Ram Cleared': 'Ram Limpa',
'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.', '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', 'Recipes': 'Receitas',
'Record': 'Registro', 'Record': 'Registro',
'record does not exist': 'registro não existe', 'record does not exist': 'registro não existe',
'Record ID': 'ID do Registro', 'Record ID': 'ID do Registro',
'Record id': 'id do registro', 'Record id': 'id do registro',
'Register': 'Registre-se',
'register': 'Registre-se', 'register': 'Registre-se',
'Register': 'Registre-se',
'Registration identifier': 'Idenficador de registro', 'Registration identifier': 'Idenficador de registro',
'Registration key': 'Chave 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', 'Reset Password key': 'Resetar chave de senha',
'Resources': 'Recursos', 'Resources': 'Recursos',
'Role': 'Papel', 'Role': 'Papel',
'Roles': 'Roles', 'Roles': 'Roles',
'Rows in Table': 'Linhas na tabela', 'Rows in Table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas', 'Rows selected': 'Linhas selecionadas',
'Save model as...': 'Save model as...', 'Save model as...': 'Salvar modelo como...',
'Semantic': 'Semântico', 'Semantic': 'Semântico',
'Services': 'Serviço', 'Services': 'Serviço',
'Sign Up': 'Sign Up', 'Sign Up': 'Cadastrar',
'Sign up': 'Cadastrar',
'Size of cache:': 'Tamanho do cache:', 'Size of cache:': 'Tamanho do cache:',
'state': 'estado', 'state': 'estado',
'Statistics': 'Estatísticas', 'Statistics': 'Estatísticas',
@@ -204,6 +209,7 @@
'Welcome to web2py': 'Bem-vindo ao web2py', 'Welcome to web2py': 'Bem-vindo ao web2py',
'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', '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...', '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',
'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'): if configuration.get('scheduler.enabled'):
from gluon.scheduler import Scheduler from gluon.scheduler import Scheduler
scheduler = Scheduler(db, heartbeat=configuration.get('heartbeat')) scheduler = Scheduler(db, heartbeat=configuration.get('scheduler.heartbeat'))
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Define your tables below (or better in another model file) for example # Define your tables below (or better in another model file) for example

View File

@@ -348,3 +348,13 @@ td.w2p_fc,
.icon.pen:before { content: "\f040";} .icon.pen:before { content: "\f040";}
.icon.arrowright:before { content: "\f061";} .icon.arrowright:before { content: "\f061";}
.icon.magnifier:before { content: "\f002";} .icon.magnifier:before { content: "\f002";}
.web2py_table_selectable_actions {
padding-top: 10px;
float: right;
}
.web2py_table_selectable_actions input {
padding: 5px 7px;
margin-right: 10px;
}

View File

@@ -52,7 +52,7 @@
}); });
} }
var ul = this; var ul = this;
$(ul).find(":text").addClass('form-control').wrap("<div class='input-group'></div>").after('<div class="input-group-addon"><i class="glyphicon glyphicon-plus"></i></div><div class="input-group-addon"><i class="glyphicon glyphicon-minus"></i></div>').keypress(function(e) { $(ul).find(":text").addClass('form-control').wrap("<div class='input-group'></div>").after('<div class="input-group-append"><i class="fa fa-plus-circle"></i></div>&nbsp;<div class="input-group-append"><i class="fa fa-minus-circle"></i></div>').keypress(function(e) {
return (e.which == 13) ? pe(ul, e) : true; return (e.which == 13) ? pe(ul, e) : true;
}).next().click(function(e) { }).next().click(function(e) {
pe(ul, e); pe(ul, e);

View File

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

View File

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

View File

@@ -1,28 +1,26 @@
{{extend 'layout.html'}} {{extend 'layout.html'}}
<h2> <div class="row">
{{=T('Sign Up') if request.args(0) == 'register' else T('Log In') if request.args(0) == 'login' else T(request.args(0).replace('_',' ').title())}} <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> <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())}}
<div class="container"> </h2>
<div class="row"> {{=form}}
<div id="web2py_user_form" class="col-lg-6"> {{if request.args(0)=='login' and not 'register' in auth.settings.actions_disabled:}}
{{ <a href="{{=URL('user/register')}}">{{=T('Register')}}</a>
if request.args(0)=='login': <br/>
if not 'register' in auth.settings.actions_disabled: {{pass}}
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') {{if request.args(0)=='login' and not 'retrieve_password' in auth.settings.actions_disabled:}}
pass <a href="{{=URL('user/retrieve_password')}}">{{=T('Lost your password?')}}</a>
if not 'request_reset_password' in auth.settings.actions_disabled: {{pass}}
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default btn-secondary') {{if request.args(0)=='register':}}
pass <a href="{{=URL('user/login')}}">{{=T('Login')}}</a>
pass {{pass}}
=form </div>
}}
</div>
</div>
</div> </div>
{{block page_js}} {{block page_js}}
<script> <script>
jQuery("#web2py_user_form input:visible:enabled:first").focus(); jQuery("#web2py_user_form input:visible:enabled:first").focus();

View File

@@ -0,0 +1,17 @@
{{"""Usage:
def controller():
return {"": db().select(db.thing.ALL)}
And then visit that controller with a .csv extention name
"""
}}{{if len(response._vars)==1:}}{{
# Not yet find a Python 2/3 compatible StringIO pattern,
# we avoid this solution http://web2py.com/books/default/chapter/29/10/services#CSV
# Here we buffer the entire csv file instead (it is your controller's job to limit the volume anyway),
# based on: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV-one-Table-at-a-time-
content = response._vars[next(iter(response._vars))]
response.headers['Content-Type'] = 'application/vnd.ms-excel'
response.write(str(content), escape=False)
}}{{pass}}
Can't render this file because it contains an unexpected character in line 1 and column 3.

View File

@@ -5,7 +5,7 @@ filename = '%s/%s.html' % (request.controller,request.function)
if os.path.exists(os.path.join(request.folder,'views',filename)): if os.path.exists(os.path.join(request.folder,'views',filename)):
html=response.render(filename) html=response.render(filename)
else: else:
html=BODY(BEAUTIFY(response._vars)).xml() html=BODY(BEAUTIFY(response._vars))
pass pass
=pdf_from_html(html) =pdf_from_html(html)
}} }}

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
RUN apk add --no-cache python py-pip py-setuptools unzip wget py-gevent && \
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 gevent -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-gevent
docker build -t your_username/alpine-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gevent your_username/alpine-web2py-gevent
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-gevent
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-gevent
docker login -u your_username
docker build -t your_username/alpine-web2py-gevent .
docker push your_username/alpine-web2py-gevent
# 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 your_username/alpine-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gevent your_username/alpine-web2py-gevent
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-gunicorn
docker build -t your_username/alpine-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gunicorn your_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 your_username
docker build -t your_username/alpine-web2py-gunicorn .
docker push your_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 your_username/alpine-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-gunicorn your_username/alpine-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
RUN apk add --no-cache python py-pip py-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv paste
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 paste -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-paste
docker build -t your_username/alpine-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-paste your_username/alpine-web2py-paste
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-paste
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-paste
docker login -u your_username
docker build -t your_username/alpine-web2py-paste .
docker push your_username/alpine-web2py-paste
# 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 your_username/alpine-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-paste your_username/alpine-web2py-paste
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,22 @@
FROM alpine:latest
#LABEL your_label
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=ID/ST=Jakarta/L=Jakarta/O=stifix/OU=IT/CN=stifix.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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-rocket-ssl
docker build -t your_username/alpine-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name alpine-web2py-rocket-ssl your_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 your_username
docker build -t your_username/alpine-web2py-rocket-ssl .
docker push your_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 your_username/alpine-web2py-rocket-ssl .
docker run -d -v applications:/web2py/applications -p 443:443 --name alpine-web2py-rocket-ssl your_username/
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-rocket
docker build -t your_username/alpine-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-rocket your_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 your_username
docker build -t your_username/alpine-web2py-rocket .
docker push your_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 your_username/alpine-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-rocket your_username/
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-tornado
docker build -t your_username/alpine-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-tornado your_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 your_username
docker build -t your_username/alpine-web2py-tornado .
docker push your_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 your_username/alpine-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-tornado your_username/
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
RUN apk add --no-cache python py-pip py-setuptools unzip wget py-waitress && \
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 waitress -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-waitress
docker build -t your_username/alpine-web2py-waitress .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-waitress your_username/alpine-web2py-waitress
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-waitress
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-waitress
docker login -u your_username
docker build -t your_username/alpine-web2py-waitress .
docker push your_username/alpine-web2py-waitress
# 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 your_username/alpine-web2py-waitress .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-waitress your_username/alpine-web2py-waitress
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM alpine:latest
#LABEL your_label
RUN apk add --no-cache python py-pip py-setuptools unzip wget && \
pip install --upgrade pip && \
pip install virtualenv wsgiref
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 wsgiref -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Alpine/web2py-wsgiref
docker build -t your_username/alpine-web2py-wsgiref .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-wsgiref your_username/alpine-web2py-wsgiref
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Alpine/web2py-wsgiref
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Alpine/web2py-wsgiref
docker login -u your_username
docker build -t your_username/alpine-web2py-wsgiref .
docker push your_username/alpine-web2py-wsgiref
# 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 your_username/alpine-web2py-wsgiref .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name alpine-web2py-wsgiref your_username/alpine-web2py-wsgiref
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-eventlet --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 eventlet -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-eventlet
docker build -t your_username/centos-web2py-eventlet .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-eventlet your_username/centos-web2py-eventlet
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-eventlet
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-eventlet
docker login -u your_username
docker build -t your_username/centos-web2py-eventlet .
docker push your_username/centos-web2py-eventlet
# 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 your_username/centos-web2py-eventlet .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-eventlet your_username/centos-web2py-eventlet
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-gevent --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 gevent -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-gevent
docker build -t your_username/centos-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gevent your_username/centos-web2py-gevent
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-gevent
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-gevent
docker login -u your_username
docker build -t your_username/centos-web2py-gevent .
docker push your_username/centos-web2py-gevent
# 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 your_username/centos-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gevent your_username/centos-web2py-gevent
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-gunicorn
docker build -t your_username/centos-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gunicorn your_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 your_username
docker build -t your_username/centos-web2py-gunicorn .
docker push your_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 your_username/centos-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-gunicorn your_username/centos-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-paste --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 paste -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-paste
docker build -t your_username/centos-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-paste your_username/centos-web2py-paste
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-paste
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-paste
docker login -u your_username
docker build -t your_username/centos-web2py-paste .
docker push your_username/centos-web2py-paste
# 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 your_username/centos-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-paste your_username/centos-web2py-paste
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-rocket
docker build -t your_username/centos-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-rocket your_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 your_username
docker build -t your_username/centos-web2py-rocket .
docker push your_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 your_username/centos-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-rocket your_username/centos-web2py-rocket
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-tornado
docker build -t your_username/centos-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-tornado your_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 your_username
docker build -t your_username/centos-web2py-tornado .
docker push your_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 your_username/centos-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-tornado your_username/centos-web2py-tornado
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-twisted-web --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 twisted -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-twisted
docker build -t your_username/centos-web2py-twisted .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-twisted your_username/centos-web2py-twisted
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-twisted
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-twisted
docker login -u your_username
docker build -t your_username/centos-web2py-twisted .
docker push your_username/centos-web2py-twisted
# 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 your_username/centos-web2py-twisted .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-twisted your_username/centos-web2py-twisted
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget python-waitress --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 waitress -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-waitress
docker build -t your_username/centos-web2py-waitress .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-waitress your_username/centos-web2py-waitress
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-waitress
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-waitress
docker login -u your_username
docker build -t your_username/centos-web2py-waitress .
docker push your_username/centos-web2py-waitress
# 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 your_username/centos-web2py-waitress .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-waitress your_username/centos-web2py-waitress
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM centos:latest
#LABEL your_label
RUN yum install -y epel-release && \
yum install -y python python-pip python-setuptools unzip wget --nogpgcheck && \
pip install --upgrade pip && \
pip install virtualenv wsgiref
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 wsgiref -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Centos/web2py-wsgiref
docker build -t your_username/centos-web2py-wsgiref .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-wsgiref your_username/centos-web2py-wsgiref
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Centos/web2py-wsgiref
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Centos/web2py-wsgiref
docker login -u your_username
docker build -t your_username/centos-web2py-wsgiref .
docker push your_username/centos-web2py-wsgiref
# 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 your_username/centos-web2py-wsgiref .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name centos-web2py-wsgiref your_username/centos-web2py-wsgiref
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget && \
pip install virtualenv diesel
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 diesel -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-diesel
docker build -t your_username/debian-web2py-diesel .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-diesel your_username/debian-web2py-diesel
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-diesel
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-diesel
docker login -u your_username
docker build -t your_username/debian-web2py-diesel .
docker push your_username/debian-web2py-diesel
# 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 your_username/debian-web2py-diesel .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-diesel your_username/debian-web2py-diesel
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-eventlet && \
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 eventlet -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-eventlet
docker build -t your_username/debian-web2py-eventlet .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-eventlet your_username/debian-web2py-eventlet
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-eventlet
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-eventlet
docker login -u your_username
docker build -t your_username/debian-web2py-eventlet .
docker push your_username/debian-web2py-eventlet
# 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 your_username/debian-web2py-eventlet .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-eventlet your_username/debian-web2py-eventlet
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-gevent && \
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 gevent -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-gevent
docker build -t your_username/debian-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gevent your_username/debian-web2py-gevent
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-gevent
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-gevent
docker login -u your_username
docker build -t your_username/debian-web2py-gevent .
docker push your_username/debian-web2py-gevent
# 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 your_username/debian-web2py-gevent .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gevent your_username/debian-web2py-gevent
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-gunicorn && \
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-gunicorn
docker build -t your_username/debian-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gunicorn your_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 your_username
docker build -t your_username/debian-web2py-gunicorn .
docker push your_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 your_username/debian-web2py-gunicorn .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-gunicorn your_username/debian-web2py-gunicorn
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-paste && \
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 paste -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-paste
docker build -t your_username/debian-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-paste your_username/debian-web2py-paste
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-paste
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-paste
docker login -u your_username
docker build -t your_username/debian-web2py-paste .
docker push your_username/debian-web2py-paste
# 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 your_username/debian-web2py-paste .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-paste your_username/debian-web2py-paste
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,28 @@
FROM debian:latest
#LABEL your_label
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-rocket
docker build -t your_username/debian-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-rocket your_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 your_username
docker build -t your_username/debian-web2py-rocket .
docker push your_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 your_username/debian-web2py-rocket .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-rocket your_username/debian-web2py-rocket
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-tornado && \
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

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-tornado
docker build -t your_username/debian-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-tornado your_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 your_username
docker build -t your_username/debian-web2py-tornado .
docker push your_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 your_username/debian-web2py-tornado .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-tornado your_username/debian-web2py-tornado
docker-compose up -d
docker-compose ps

View File

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

View File

@@ -0,0 +1,27 @@
FROM debian:latest
#LABEL your_label
RUN apt update && \
apt install -y python python-pip python-setuptools unzip wget python-twisted && \
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 twisted -i 0.0.0.0 -p 8000

View File

@@ -0,0 +1,41 @@
# Start Service
systemctl start docker
# Docker
cd /Docker/Debian/web2py-twisted
docker build -t your_username/debian-web2py-twisted .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-twisted your_username/debian-web2py-twisted
docker ps
docker volume ls
docker volume inspect applications
# Docker Compose
pip install docker-compose
cd /Docker/Debian/web2py-twisted
docker-compose up -d
docker-compose ps
docker volume ls
docker volume inspect root_applications
# Docker Cloud
cd /Docker/Debian/web2py-twisted
docker login -u your_username
docker build -t your_username/debian-web2py-twisted .
docker push your_username/debian-web2py-twisted
# 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 your_username/debian-web2py-twisted .
docker run -d -v applications:/home/web2py/web2py/applications -p 8000:8000 --name debian-web2py-twisted your_username/debian-web2py-twisted
docker-compose up -d
docker-compose ps

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