Re: [mezzanine-users] Mezzanine on Heroku
Thanks Tom, i found the problem. I was deploying at dokku-alt + Digital Ocean (not exactly Heroku) and the problem was that Heroku automatically sets a database for you (based on the configurations). With dokku-alt you have to install a plugin (a postgres docker container) and only after that the container knows about the database. I had another problem too with S3: i had to enable Cross-origin requests to use the static elements from the bucket. In fact i had a lot of issues, all related to dokku-alt, but i found my way. I pretend to post a tutorial about deployment on dokku-alt. The rest is like Heroku, but cheaper ;-) [image: photo] *Flavio Barros* Doutorando, Unicamp w:www.flaviobarros.net https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile Meu Blog Handwritten digit recognition – Part1 http://feedproxy.google.com/~r/FlavioBarros/~3/dlnBN09FQAI/ When i die i would rather be remembered for my accomplishments not my personality - Kenneth waters Jr https://www.quotesdaddy.com/quote/1422441/kenneth-waters-jr/when-i-die-i-would-rather-be-remembered-for-my-accomplishments Get a signature like this: https://ws-stats.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS8/dXRtX3NvdXJjZT1leHRlbnNpb24mdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249cHJvbW9fNDUiLCAiZSI6ICJwcm9tb180NV9jbGljayJ9 Click here! https://ws-stats.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS8/dXRtX3NvdXJjZT1leHRlbnNpb24mdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249cHJvbW9fNDUiLCAiZSI6ICJwcm9tb180NV9jbGljayJ9 On Tue, Apr 21, 2015 at 1:08 PM, Tom Lockhart tlockhart1...@gmail.com wrote: The logs you printed show that something is missing from your database configuration, but do not show what *is* in the configuration. You might want to insert a print statement into code or into your settings.py to show the full contents. hth - Tom On Apr 21, 2015, at 8:26 AM, Flavio Barros flaviomargar...@gmail.com wrote: I saw the comments, but the problem persists. I printed the logs in the last email. [image: photo] *Flavio Barros* Doutorando, Unicamp w:www.flaviobarros.net https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile Meu Blog Handwritten digit recognition – Part1 http://feedproxy.google.com/~r/FlavioBarros/~3/dlnBN09FQAI/ When i die i would rather be remembered for my accomplishments not my personality - Kenneth waters Jr https://www.quotesdaddy.com/quote/1422441/kenneth-waters-jr/when-i-die-i-would-rather-be-remembered-for-my-accomplishments Get a signature like this: https://ws-stats.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS8/dXRtX3NvdXJjZT1leHRlbnNpb24mdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249cHJvbW9fNDUiLCAiZSI6ICJwcm9tb180NV9jbGljayJ9Click here! https://ws-stats.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS8/dXRtX3NvdXJjZT1leHRlbnNpb24mdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249cHJvbW9fNDUiLCAiZSI6ICJwcm9tb180NV9jbGljayJ9 On Tue, Apr 21, 2015 at 12:17 PM, Tom Lockhart tlockhart1...@gmail.com wrote: DATABASES[“default”] is not what you hope it is. The tutorial you reference has a comment thread addressing the same issue. Can you try printing the contents of DATABASES into a log or something? hth - Tom On Apr 20, 2015, at 7:59 AM, Flavio Barros flaviomargar...@gmail.com wrote: I'm following this tutorial: http://www.benhavilland.com/blog/deploying-mezzanine-on-heroku/#rating-6 but i'm getting a strange error: 14:54:39 web.1 | started with pid 14 14:54:40 web.1 | Traceback (most recent call last): 14:54:40 web.1 | File manage.py, line 10, in module 14:54:40 web.1 | from settings import PROJECT_ROOT, PROJECT_DIRNAME 14:54:40 web.1 | File /app/settings.py, line 424, in module 14:54:40 web.1 | set_dynamic_settings(globals()) 14:54:40 web.1 | File /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/conf.py, line 222, in set_dynamic_settings 14:54:40 web.1 | shortname = db[ENGINE].split(.)[-1] *14:54:40 web.1 | KeyError: u'ENGINE'* 14:54:40 web.1 | exited with code 1 14:54:40 system | sending SIGTERM to all processes What is this KeyError:u'Engine' ? [image: photo] *Flavio Barros* Doutorando, Unicamp w:www.flaviobarros.net https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile Meu Blog Handwritten digit recognition – Part1 http://feedproxy.google.com/~r/FlavioBarros/~3/dlnBN09FQAI/ The tragedy of life is not that it ends so soon, but that we wait so long to begin it. - W. M. Lewis https://www.quotesdaddy.com/quote/232683/w-m-lewis/the-tragedy-of-life-is-not-that-it-ends-so-soon-but Get a signature like this: https://ws-stats.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS8/dXRtX3NvdXJjZT1leHRlbnNpb24mdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249cHJvbW9fNDUiLCAiZSI6ICJwcm9tb180NV9jbGljayJ9Click here!
Re: [mezzanine-users] Mezzanine on Heroku
Hey Stephen, Did you since delete that repo? On Friday, July 20, 2012 7:18:21 AM UTC-5, Stephen McDonald wrote: As discussed on IRC, here are the bits I used to get Mezzanine and Cartridge up on Heroku (http://mezzanine.herokuapp.com) back in March this year. My repo has a directory called mezzroku which is the project itself. Procfile: web: python mezzroku/manage.py createdb --noinput; python mezzroku/manage.py migrate; python mezzroku/manage.py run_gunicorn -b 0.0.0.0:$PORT -w 3 requirements.txt: Cartridge==0.4.9 Django==1.3.1 distribute==0.6.19 psycopg2==2.4.4 wsgiref==0.1.2 gunicorn==0.13.4 South==0.7.3 django-storages==1.1.4 boto==2.2.2 On Fri, Jul 20, 2012 at 4:52 AM, knite pik...@gmail.com javascript:wrote: I recently deployed a Mezzanine project to Heroku. The process differs a bit from standard Django, and took some tinkering, so I thought I would document the necessary changes here. All of these changes stem from the fact that a typical Django project has a myproj/myproj/ folder structure (manage.py at the top level, the rest in the sub-folder), whereas Mezzanine eliminates the myproj/ sub-directory. 1) In settings.py, replace ROOT_URLCONF = %s.urls % PROJECT_DIRNAME with ROOT_URLCONF = urls (I found no instances of ROOT_URLCONF in Mezzanine's codebase, so I believe this change will not break anything.) 2) Create wsgi.py at the top level of your project. This file is created when using django-admin.py to start a project, but not when using mezzanine-project. The default contents should be tweaked slightly if you do not use the DJANGO_SETTINGS_MODULE environment variable: import os os.environ.setdefault(DJANGO_SETTINGS_MODULE, settings) from django.core.wsgi import get_wsgi_application application = get_wsgi_application() 3) Modify the Procfile example given in Heroku's docs ( https://devcenter.heroku.com/articles/django): web: gunicorn wsgi -b 0.0.0.0:$PORT (Note: for production, gevent should be used. I haven't gotten there yet, but it should be as simple as appending '-w number of workers -k gevent'.) You'll also need to serve your static files.There are a few ways to do this, the main choice being whether to wrap your web worker with a call to collectstatic, or use Amazon S3. ...and that's where I'm stuck! After the above, I get the following error when I deploy: 2012-07-19T18:41:39+00:00 app[web.1]: 2012-07-19 20:41:39 [5] [ERROR] Error handling request 2012-07-19T18:41:39+00:00 app[web.1]: Traceback (most recent call last): 2012-07-19T18:41:39+00:00 app[web.1]: File /app/.heroku/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py, line 219, in __call__ 2012-07-19T18:41:39+00:00 app[web.1]: File /app/.heroku/venv/lib/python2.7/site-packages/gunicorn/workers/sync.py, line 99, in handle_request 2012-07-19T18:41:39+00:00 app[web.1]: respiter = self.wsgi(environ, resp.start_response) 2012-07-19T18:41:39+00:00 app[web.1]: self.load_middleware() 2012-07-19T18:41:39+00:00 app[web.1]: File /app/.heroku/venv/lib/python2.7/site-packages/django/core/handlers/base.py, line 47, in load_middleware 2012-07-19T18:41:39+00:00 app[web.1]: raise exceptions.ImproperlyConfigured('Error importing middleware %s: %s' % (mw_module, e)) 2012-07-19T18:41:39+00:00 app[web.1]: ImproperlyConfigured: Error importing middleware mezzanine.core.middleware: cannot import name utils Does anyone know what might be happening in mezzanine.core.middleware? It doesn't directly import a module named utils, but does have: from django.utils.cache import get_max_age from mezzanine.utils.cache import (cache_key_prefix, nevercache_token, cache_get, cache_set, cache_installed) from mezzanine.utils.device import templates_for_device from mezzanine.utils.sites import templates_for_host --Aris -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups Mezzanine Users group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.