mimischi / django-docker Goto Github PK
View Code? Open in Web Editor NEWToy project. Trying to use Django inside a Docker container for both local development and production deployment.
Toy project. Trying to use Django inside a Docker container for both local development and production deployment.
Wouldn't it be greate to have this project as cookiecutter template?
With this one can avoid the trouble of cloneing and carrying all the previous commits and also avoid renaming stuff.
Is there a reason why #3 isn't merged yet ?
Got the following error fresh from baking. Am I missing something?
django.db.utils.ProgrammingError
django.db.utils.ProgrammingError: relation "main_visits" does not exist
LINE 1: ...CT "main_visits"."id", "main_visits"."count" FROM "main_visi...
^
Trace:
web_1 | 10.0.2.2 - - [24/Feb/2018 04:52:44] "GET / HTTP/1.1" 500 -
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 66, in __call__
web_1 | return self.application(environ, start_response)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 146, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 81, in get_response
web_1 | response = self._middleware_chain(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
web_1 | response = self.get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
web_1 | response = response_for_exception(request, exc)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
web_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
web_1 | return debug.technical_500_response(request, *exc_info)
web_1 | File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
web_1 | six.reraise(exc_type, exc_value, tb)
web_1 | File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
web_1 | raise value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
web_1 | response = self.process_exception_by_middleware(e, request)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
web_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1 | File "/app/main/views.py", line 11, in home
web_1 | c = Visits.objects.get(pk=1)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
web_1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 397, in get
web_1 | num = len(clone)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 254, in __len__
web_1 | self._fetch_all()
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1179, in _fetch_all
web_1 | self._result_cache = list(self._iterable_class(self))
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 53, in __iter__
web_1 | results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1064, in execute_sql
web_1 | cursor.execute(sql, params)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
web_1 | return super().execute(sql, params)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
web_1 | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
web_1 | return executor(sql, params, many, context)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
web_1 | return self.cursor.execute(sql, params)
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
web_1 | raise dj_exc_value.with_traceback(traceback) from exc_value
web_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
web_1 | return self.cursor.execute(sql, params)
web_1 | django.db.utils.ProgrammingError: relation "main_visits" does not exist
web_1 | LINE 1: ...CT "main_visits"."id", "main_visits"."count" FROM "main_visi...
web_1 |
It might be usefull to run project tests, if provided, in the predeploy state and if any of them fails reject the changes. This should only be used for detecting wether there are failing tests or not. So we should keep it simple just, eventually echo the number of failed, and stop the deploy when not passing all tests.
I know that nowadays there are services like Travis CI which do that for you, even Github integrated, but why not double check it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.