nickjj / build-a-saas-app-with-flask Goto Github PK
View Code? Open in Web Editor NEWLearn how to build a production ready web app with Flask and Docker.
Home Page: https://buildasaasappwithflask.com
License: MIT License
Learn how to build a production ready web app with Flask and Docker.
Home Page: https://buildasaasappwithflask.com
License: MIT License
Everything will be ran in a container when it comes to deploying it. Implement a way to get various health checks on each container and the overall system.
They will be accessible through the admin dashboard.
I've been playing around with the code and tried to remove the billing and streaming, this meant I also remove the click commands for the billing and streaming features. Though now when I try to run it I am getting this error,
Error importing module add:
add
Do you know what may be causing click to not be able to import the commands and do you have any ideas about how I might fix this bug. Thanks
Hi Nick
I make some change and now can't access admin dashboard
[email protected]/password is incorrect
where is admin username/password defined?
Thank you
When trying to build the app redis is complaining version mismatch:
[2019-03-26 11:28:43,098: CRITICAL/MainProcess] Unrecoverable error: VersionMismatch(u'Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6',)
celery_1 | Traceback (most recent call last):
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/worker.py", line 205, in start
celery_1 | self.blueprint.start(self)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
celery_1 | step.start(parent)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 370, in start
celery_1 | return self.obj.start()
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 316, in start
celery_1 | blueprint.start(self)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
celery_1 | step.start(parent)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/connection.py", line 23, in start
celery_1 | c.connection = c.connect()
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 403, in connect
celery_1 | conn = self.connection_for_read(heartbeat=self.amqheartbeat)
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 410, in connection_for_read
celery_1 | self.app.connection_for_read(heartbeat=heartbeat))
celery_1 | File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 434, in ensure_connected
celery_1 | callback=maybe_shutdown,
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 422, in ensure_connection
celery_1 | callback, timeout=timeout)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/utils/functional.py", line 341, in retry_over_time
celery_1 | return fun(*args, **kwargs)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 275, in connect
celery_1 | return self.connection
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 823, in connection
celery_1 | self._connection = self._establish_connection()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 778, in _establish_connection
celery_1 | conn = self.transport.establish_connection()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 941, in establish_connection
celery_1 | self._avail_channels.append(self.create_channel(self))
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 923, in create_channel
celery_1 | channel = self.Channel(connection)
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 495, in __init__
celery_1 | self.Client = self._get_client()
celery_1 | File "/usr/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 956, in _get_client
celery_1 | 'You have {0.__version__}'.format(redis))
celery_1 | VersionMismatch: Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6
celery_1 | [2019-03-26 11:28:44,119: INFO/MainProcess] beat: Shutting down...
Fix is to update the requirements.txt
to redis==3.2.*
I don't know,why you choose Flask rather than Django? and;
does my subscription and learning from your course can help me though, familiarize django tech stack
The real time tweet page will:
...
The blueprint will include functionality such as:
It would be nice to be able to check the status of your task worker(s). Implement a way to view metrics about your tasks and make it accessible through the admin dashboard.
attempt to deploy cat watch on linux server.
nginx sends request and is working fine. but cat watch gives error 404 in browser.
see log:
`[2016-03-13 17:07:43 +0000] [7] [INFO] Starting gunicorn 19.3.0
[2016-03-13 17:07:43 +0000] [7] [INFO] Listening at: http://0.0.0.0:8000 (7)
[2016-03-13 17:07:43 +0000] [7] [INFO] Using worker: sync
[2016-03-13 17:07:43 +0000] [12] [INFO] Booting worker with pid: 12
INFO in register [/catwatch/catwatch/register.py:170]:
`
when trying to buy a 'gold package' from catwatch I got an internal server error (I think the problem happened with the POST request)
I shut down the app and attempted to start it up again but when running
run db reset catwatch catwatch_test
i got this error;
Error response from daemon: no such id: dropdb
Error response from daemon: no such id: dropdb
Error response from daemon: no such id: psql
Error response from daemon: no such id: createdb
Error response from daemon: no such id: createdb
Traceback (most recent call last):
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/bin/run", line 9, in <module>
load_entry_point('Commands-to-help-manage-your-project==1.0', 'console_scripts', 'run')()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/Users/victoriaferguson/dev/docker/myapp/website/cli/commands/cmd_db.py", line 226, in reset
ctx.invoke(create, databases=databases)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/Users/victoriaferguson/dev/docker/myapp/website/cli/commands/cmd_db.py", line 199, in create
return db.create_all()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 895, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 887, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 3687, in create_all
tables=tables)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1855, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1848, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2039, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
e, dialect, self)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
exc_info
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
return fn()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 713, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1060, in _do_get
self._dec_overflow()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1057, in _do_get
return self._create_connection()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 323, in _create_connection
return _ConnectionRecord(self)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 449, in __init__
self.connection = self.__connect()
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 607, in __connect
connection = self.__pool._invoke_creator(self)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 97, in connect
return dialect.connect(*cargs, **cparams)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 385, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
Is the server running on host "192.168.99.100" and accepting
TCP/IP connections on port 5432?
The docker daemon is running (verified it by running hello-world again) and I have check the ip address using;
docker-machine ip default
Any suggestions on how I might fix this and what is causing it ?
EDIT - Following is the error that is arises when I try to process payment in the app;
11:29:18 web.1 | POST "/subscription/create" in 1186ms for 127.0.0.1
11:29:18 web.1 | [2015-12-09 11:29:18 +0000] [23159] [ERROR] Error handling request
11:29:18 web.1 | Traceback (most recent call last):
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 130, in handle
11:29:18 web.1 | self.handle_request(listener, req, client, addr)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 171, in handle_request
11:29:18 web.1 | respiter = self.wsgi(environ, resp.start_response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
11:29:18 web.1 | return self.wsgi_app(environ, start_response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/docker/myapp/website/catwatch/lib/http_method_override_middleware.py", line 42, in __call__
11:29:18 web.1 | return self.app(environ, start_response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/werkzeug/contrib/fixers.py", line 152, in __call__
11:29:18 web.1 | return self.app(environ, start_response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
11:29:18 web.1 | response = self.make_response(self.handle_exception(e))
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
11:29:18 web.1 | reraise(exc_type, exc_value, tb)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
11:29:18 web.1 | response = self.full_dispatch_request()
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1479, in full_dispatch_request
11:29:18 web.1 | response = self.process_response(response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 1693, in process_response
11:29:18 web.1 | self.save_session(ctx.session, response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/app.py", line 837, in save_session
11:29:18 web.1 | return self.session_interface.save_session(self, session, response)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/sessions.py", line 326, in save_session
11:29:18 web.1 | val = self.get_signing_serializer(app).dumps(dict(session))
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/itsdangerous.py", line 565, in dumps
11:29:18 web.1 | payload = want_bytes(self.dump_payload(obj))
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/itsdangerous.py", line 847, in dump_payload
11:29:18 web.1 | json = super(URLSafeSerializerMixin, self).dump_payload(obj)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/itsdangerous.py", line 550, in dump_payload
11:29:18 web.1 | return want_bytes(self.serializer.dumps(obj))
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/sessions.py", line 85, in dumps
11:29:18 web.1 | return json.dumps(_tag(value), separators=(',', ':'))
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/json.py", line 126, in dumps
11:29:18 web.1 | rv = _json.dumps(obj, **kwargs)
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 250, in dumps
11:29:18 web.1 | sort_keys=sort_keys, **kw).encode(obj)
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 209, in encode
11:29:18 web.1 | chunks = list(chunks)
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 434, in _iterencode
11:29:18 web.1 | for chunk in _iterencode_dict(o, _current_indent_level):
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
11:29:18 web.1 | for chunk in chunks:
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 332, in _iterencode_list
11:29:18 web.1 | for chunk in chunks:
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
11:29:18 web.1 | for chunk in chunks:
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 332, in _iterencode_list
11:29:18 web.1 | for chunk in chunks:
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 442, in _iterencode
11:29:18 web.1 | o = _default(o)
11:29:18 web.1 | File "/Users/victoriaferguson/dev/virtualenvs/catwatch/lib/python2.7/site-packages/flask/json.py", line 83, in default
11:29:18 web.1 | return _json.JSONEncoder.default(self, o)
11:29:18 web.1 | File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default
11:29:18 web.1 | raise TypeError(repr(o) + " is not JSON serializable")
11:29:18 web.1 | TypeError: InvalidRequestError(u'No such plan: gold',) is not JSON serializable
I'm trying to test the periodic celery tasks. However, when I try to start the celery container I get the following error:
Removing corrupted schedule file 'celerybeat-schedule': error(22, 'Invalid argument')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'scheduler'
As per the course notes, I have tried to amend the docker-compose.yml to run the celery and beat worker independently:
celery:
build: .
command: celery worker -l info -A snakeeyes.blueprints.contact.tasks
env_file:
- '.env'
volumes:
- '.:/snakeeyes'
celery_beat:
build: .
command: celery beat -l info -A snakeeyes.blueprints.contact.tasks
env_file:
- '.env'
volumes:
- '.:/snakeeyes'
However I still get the same issue. I have also tried to delete the celerybeat-schedule file which seems to be corrupted however upon running docker-compose up
the file gets recreated which throws the same error.
Below is the full trace back:
celery_beat_1 | celery beat v4.3.0 (rhubarb) is starting.
celery_beat_1 | __ - ... __ - _
celery_beat_1 | LocalTime -> 2020-05-24 19:44:38
celery_beat_1 | Configuration ->
celery_beat_1 | . broker -> redis://:**@redis:6379/0
celery_beat_1 | . loader -> celery.loaders.app.AppLoader
celery_beat_1 | . scheduler -> celery.beat.PersistentScheduler
celery_beat_1 | . db -> celerybeat-schedule
celery_beat_1 | . logfile -> [stderr]@%INFO
celery_beat_1 | . maxinterval -> 5.00 minutes (300s)
celery_beat_1 | [2020-05-24 19:44:38,622: INFO/MainProcess] beat: Starting...
celery_beat_1 | [2020-05-24 19:44:38,696: ERROR/MainProcess] Removing corrupted schedule file 'celerybeat-schedule': error(22, 'Invalid argument')
celery_beat_1 | Traceback (most recent call last):
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__
celery_beat_1 | return obj.__dict__[self.__name__]
celery_beat_1 | KeyError: 'scheduler'
celery_beat_1 |
celery_beat_1 | During handling of the above exception, another exception occurred:
celery_beat_1 |
celery_beat_1 | Traceback (most recent call last):
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 485, in setup_schedule
celery_beat_1 | self._store = self._open_schedule()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 475, in _open_schedule
celery_beat_1 | return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 243, in open
celery_beat_1 | return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 227, in __init__
celery_beat_1 | Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/dbm/__init__.py", line 94, in open
celery_beat_1 | return mod.open(file, flag, mode)
celery_beat_1 | _gdbm.error: [Errno 22] Invalid argument
celery_beat_1 | [2020-05-24 19:44:38,730: CRITICAL/MainProcess] beat raised exception <class '_gdbm.error'>: error(22, 'Invalid argument')
celery_beat_1 | Traceback (most recent call last):
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__
celery_beat_1 | return obj.__dict__[self.__name__]
celery_beat_1 | KeyError: 'scheduler'
celery_beat_1 |
celery_beat_1 | During handling of the above exception, another exception occurred:
celery_beat_1 |
celery_beat_1 | Traceback (most recent call last):
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 485, in setup_schedule
celery_beat_1 | self._store = self._open_schedule()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 475, in _open_schedule
celery_beat_1 | return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 243, in open
celery_beat_1 | return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 227, in __init__
celery_beat_1 | Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/dbm/__init__.py", line 94, in open
celery_beat_1 | return mod.open(file, flag, mode)
celery_beat_1 | _gdbm.error: [Errno 22] Invalid argument
celery_beat_1 |
celery_beat_1 | During handling of the above exception, another exception occurred:
celery_beat_1 |
celery_beat_1 | Traceback (most recent call last):
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/apps/beat.py", line 109, in start_scheduler
celery_beat_1 | service.start()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 588, in start
celery_beat_1 | humanize_seconds(self.scheduler.max_interval))
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 44, in __get__
celery_beat_1 | value = obj.__dict__[self.__name__] = self.__get(obj)
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 632, in scheduler
celery_beat_1 | return self.get_scheduler()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 627, in get_scheduler
celery_beat_1 | lazy=lazy,
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 467, in __init__
celery_beat_1 | Scheduler.__init__(self, *args, **kwargs)
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 226, in __init__
celery_beat_1 | self.setup_schedule()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 493, in setup_schedule
celery_beat_1 | self._store = self._destroy_open_corrupted_schedule(exc)
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 481, in _destroy_open_corrupted_schedule
celery_beat_1 | return self._open_schedule()
celery_beat_1 | File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 475, in _open_schedule
celery_beat_1 | return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 243, in open
celery_beat_1 | return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/shelve.py", line 227, in __init__
celery_beat_1 | Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_1 | File "/usr/local/lib/python3.7/dbm/__init__.py", line 94, in open
celery_beat_1 | return mod.open(file, flag, mode)
celery_beat_1 | _gdbm.error: [Errno 22] Invalid argument
celery_beat_1 | [2020-05-24 19:44:38,736: WARNING/MainProcess] Traceback (most recent call last):
celery_beat_1 | [2020-05-24 19:44:38,737: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__
celery_beat_1 | [2020-05-24 19:44:38,738: WARNING/MainProcess] return obj.__dict__[self.__name__]
celery_beat_1 | [2020-05-24 19:44:38,739: WARNING/MainProcess] KeyError
celery_beat_1 | [2020-05-24 19:44:38,743: WARNING/MainProcess] :
celery_beat_1 | [2020-05-24 19:44:38,744: WARNING/MainProcess] 'scheduler'
celery_beat_1 | [2020-05-24 19:44:38,745: WARNING/MainProcess] During handling of the above exception, another exception occurred:
celery_beat_1 | [2020-05-24 19:44:38,746: WARNING/MainProcess] Traceback (most recent call last):
celery_beat_1 | [2020-05-24 19:44:38,747: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 485, in setup_schedule
celery_beat_1 | [2020-05-24 19:44:38,749: WARNING/MainProcess] self._store = self._open_schedule()
celery_beat_1 | [2020-05-24 19:44:38,751: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 475, in _open_schedule
celery_beat_1 | [2020-05-24 19:44:38,756: WARNING/MainProcess] return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_1 | [2020-05-24 19:44:38,757: WARNING/MainProcess] File "/usr/local/lib/python3.7/shelve.py", line 243, in open
celery_beat_1 | [2020-05-24 19:44:38,759: WARNING/MainProcess] return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_1 | [2020-05-24 19:44:38,760: WARNING/MainProcess] File "/usr/local/lib/python3.7/shelve.py", line 227, in __init__
celery_beat_1 | [2020-05-24 19:44:38,761: WARNING/MainProcess] Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_1 | [2020-05-24 19:44:38,762: WARNING/MainProcess] File "/usr/local/lib/python3.7/dbm/__init__.py", line 94, in open
celery_beat_1 | [2020-05-24 19:44:38,764: WARNING/MainProcess] return mod.open(file, flag, mode)
celery_beat_1 | [2020-05-24 19:44:38,770: WARNING/MainProcess] _gdbm
celery_beat_1 | [2020-05-24 19:44:38,772: WARNING/MainProcess] .
celery_beat_1 | [2020-05-24 19:44:38,774: WARNING/MainProcess] error
celery_beat_1 | [2020-05-24 19:44:38,776: WARNING/MainProcess] :
celery_beat_1 | [2020-05-24 19:44:38,777: WARNING/MainProcess] [Errno 22] Invalid argument
celery_beat_1 | [2020-05-24 19:44:38,778: WARNING/MainProcess] During handling of the above exception, another exception occurred:
celery_beat_1 | [2020-05-24 19:44:38,779: WARNING/MainProcess] Traceback (most recent call last):
celery_beat_1 | [2020-05-24 19:44:38,779: WARNING/MainProcess] File "/usr/local/bin/celery", line 8, in <module>
celery_beat_1 | [2020-05-24 19:44:38,780: WARNING/MainProcess] sys.exit(main())
celery_beat_1 | [2020-05-24 19:44:38,782: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/__main__.py", line 16, in main
celery_beat_1 | [2020-05-24 19:44:38,783: WARNING/MainProcess] _main()
celery_beat_1 | [2020-05-24 19:44:38,785: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 322, in main
celery_beat_1 | [2020-05-24 19:44:38,787: WARNING/MainProcess] cmd.execute_from_commandline(argv)
celery_beat_1 | [2020-05-24 19:44:38,788: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 496, in execute_from_commandline
celery_beat_1 | [2020-05-24 19:44:38,795: WARNING/MainProcess] super(CeleryCommand, self).execute_from_commandline(argv)))
celery_beat_1 | [2020-05-24 19:44:38,796: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 298, in execute_from_commandline
celery_beat_1 | [2020-05-24 19:44:38,797: WARNING/MainProcess] return self.handle_argv(self.prog_name, argv[1:])
celery_beat_1 | [2020-05-24 19:44:38,798: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 488, in handle_argv
celery_beat_1 | [2020-05-24 19:44:38,801: WARNING/MainProcess] return self.execute(command, argv)
celery_beat_1 | [2020-05-24 19:44:38,803: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 420, in execute
celery_beat_1 | [2020-05-24 19:44:38,809: WARNING/MainProcess] ).run_from_argv(self.prog_name, argv[1:], command=argv[0])
celery_beat_1 | [2020-05-24 19:44:38,810: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 302, in run_from_argv
celery_beat_1 | [2020-05-24 19:44:38,812: WARNING/MainProcess] sys.argv if argv is None else argv, command)
celery_beat_1 | [2020-05-24 19:44:38,813: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 386, in handle_argv
celery_beat_1 | [2020-05-24 19:44:38,818: WARNING/MainProcess] return self(*args, **options)
celery_beat_1 | [2020-05-24 19:44:38,821: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 252, in __call__
celery_beat_1 | [2020-05-24 19:44:38,827: WARNING/MainProcess] ret = self.run(*args, **kwargs)
celery_beat_1 | [2020-05-24 19:44:38,827: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/bin/beat.py", line 109, in run
celery_beat_1 | [2020-05-24 19:44:38,830: WARNING/MainProcess] return beat().run()
celery_beat_1 | [2020-05-24 19:44:38,830: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/apps/beat.py", line 81, in run
celery_beat_1 | [2020-05-24 19:44:38,832: WARNING/MainProcess] self.start_scheduler()
celery_beat_1 | [2020-05-24 19:44:38,833: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/apps/beat.py", line 109, in start_scheduler
celery_beat_1 | [2020-05-24 19:44:38,834: WARNING/MainProcess] service.start()
celery_beat_1 | [2020-05-24 19:44:38,836: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 588, in start
celery_beat_1 | [2020-05-24 19:44:38,838: WARNING/MainProcess] humanize_seconds(self.scheduler.max_interval))
celery_beat_1 | [2020-05-24 19:44:38,841: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 44, in __get__
celery_beat_1 | [2020-05-24 19:44:38,843: WARNING/MainProcess] value = obj.__dict__[self.__name__] = self.__get(obj)
celery_beat_1 | [2020-05-24 19:44:38,844: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 632, in scheduler
celery_beat_1 | [2020-05-24 19:44:38,849: WARNING/MainProcess] return self.get_scheduler()
celery_beat_1 | [2020-05-24 19:44:38,850: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 627, in get_scheduler
celery_beat_1 | [2020-05-24 19:44:38,852: WARNING/MainProcess] lazy=lazy,
celery_beat_1 | [2020-05-24 19:44:38,852: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 467, in __init__
celery_beat_1 | [2020-05-24 19:44:38,855: WARNING/MainProcess] Scheduler.__init__(self, *args, **kwargs)
celery_beat_1 | [2020-05-24 19:44:38,859: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 226, in __init__
celery_beat_1 | [2020-05-24 19:44:38,864: WARNING/MainProcess] self.setup_schedule()
celery_beat_1 | [2020-05-24 19:44:38,865: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 493, in setup_schedule
celery_beat_1 | [2020-05-24 19:44:38,867: WARNING/MainProcess] self._store = self._destroy_open_corrupted_schedule(exc)
celery_beat_1 | [2020-05-24 19:44:38,868: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 481, in _destroy_open_corrupted_schedule
celery_beat_1 | [2020-05-24 19:44:38,873: WARNING/MainProcess] return self._open_schedule()
celery_beat_1 | [2020-05-24 19:44:38,874: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/beat.py", line 475, in _open_schedule
celery_beat_1 | [2020-05-24 19:44:38,876: WARNING/MainProcess] return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_1 | [2020-05-24 19:44:38,879: WARNING/MainProcess] File "/usr/local/lib/python3.7/shelve.py", line 243, in open
celery_beat_1 | [2020-05-24 19:44:38,884: WARNING/MainProcess] return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_1 | [2020-05-24 19:44:38,885: WARNING/MainProcess] File "/usr/local/lib/python3.7/shelve.py", line 227, in __init__
celery_beat_1 | [2020-05-24 19:44:38,886: WARNING/MainProcess] Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_1 | [2020-05-24 19:44:38,887: WARNING/MainProcess] File "/usr/local/lib/python3.7/dbm/__init__.py", line 94, in open
celery_beat_1 | [2020-05-24 19:44:38,889: WARNING/MainProcess] return mod.open(file, flag, mode)
celery_beat_1 | [2020-05-24 19:44:38,890: WARNING/MainProcess] _gdbm
celery_beat_1 | [2020-05-24 19:44:38,892: WARNING/MainProcess] .
celery_beat_1 | [2020-05-24 19:44:38,896: WARNING/MainProcess] error
celery_beat_1 | [2020-05-24 19:44:38,898: WARNING/MainProcess] :
What's the best way on adding custom .css and .js files,
I added my files into assets, but they don't seem to be in effect.
Custom error pages for 404, 500 and 502 status codes.
There are a number of things that can be done in the webpack config to further improve performance in development mode, such as:
Additional loaders will also be added to do things such as:
hello nickjj
i am seeing csrf token missing or invalid error in production server
i thought maybe because of import error in all Forms.py:
import Form from wtforms << no csrf protection
import Form from flask.ext.wtf << usually do like this
see here last section Troubleshooting: http://flask-wtf.readthedocs.org/en/latest/csrf.html
But still not working! i am seeing csrf error when i try to login.
i have secret key in settings.py file
Full stack traces and all relevant details will get e-mailed to you when exceptions occur.
Locales and timezones should be not be 2nd class citizens in a SAAS app. Introduce settings to allow users to set both in their account settings.
The entire app will be combed over, function by function with intentions to move code around into places that will allow for better maintainability and easier customization.
This will end up doing various things like moving logic out of the views and into either the model or libraries and so on.
Currently bulk deleting users does not delete their membership on the payment gateway. The bulk delete routine should be overridden to also delete them on the payment gateway's end if they are a subscriber.
When trying to send an email through the smtp.gmail.com server I receive a notification saying that the app doesn't meet modern security standards.
What can I add the bring Catwatch up to these standards so I can safely use the Gmail SMTP server?
The admin blueprint will be updated to include:
Whenever I try to install the requirements I get:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-buil d-CBf1KO/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file_ _).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-M gq0ua-record/install-record.txt --single-version-externally-managed --compile" f ailed with error code 1 in /tmp/pip-build-CBf1KO/psycopg2
The broadcast module will be responsible for:
TO THE MOON
I've had a number of requests to move away from Google's starter kit, and instead use Bootstrap.
I didn't want to impose any design designs initially, and Google's starter kit is still written in SASS so it would be pretty easy to move to Bootstrap but that would still leave you guys having to rip it all out and change a ton of templates.
The entire app will get switched to the latest version of Bootstrap.
I had many issues getting the Docker containers going on my Mac, so I thought I'd share some workarounds here. I'm fairly new to Docker, so there may be mistakes! There are a couple of project-related issues at the end too :-)
First, install Docker, boot2docker and Docker-compose.
There are problems with the permissions on vboxsf mounts, preventing postgres from writing to /var/lib/postgresql/data. You need to either change the access permissions, or mount to your home folder using nfs instead. The latter is described here: http://syskall.com/using-boot2docker-using-nfs-instead-of-vboxsf/
You should also add "$(boot2docker shellinit 2> /dev/null)" to the bottom of your ~/.bash_profile.
Next, you may need to fix the ip/certification bug. To edit the profile, run:
$ boot2docker ssh -t sudo vi /var/lib/boot2docker/profile)
Now when you reach the initialization stage, you need to issue:
$ run assets build
to create the manifest.json first, before issuing run
to see a list of what's available.
You then may need to replace all instances of "website_postgres_1" in cli/commands/cmd_db.py with the correct name of the postgresql host (eg. "buildasaasappwithflask_postgres_1").
The last issue is unresolved. When I try to initialize the database, I get the following error:
$ run db create
DROP ROLE
CREATE ROLE
CREATE DATABASE catwatch;
GRANT
Traceback (most recent call last):
File "/Users/rog/.virtualenvs/catwatch/bin/run", line 9, in <module>
load_entry_point('Commands-to-help-manage-your-project==1.0', 'console_scripts', 'run')()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/Users/rog/Workspace/build-a-saas-app-with-flask/cli/commands/cmd_db.py", line 157, in create
return db.create_all()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 895, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 887, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 3622, in create_all
tables=tables)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1853, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1846, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2037, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2076, in _wrap_pool_connect
e, dialect, self)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
exc_info
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2072, in _wrap_pool_connect
return fn()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1055, in _do_get
self._dec_overflow()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1052, in _do_get
return self._create_connection()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 323, in _create_connection
return _ConnectionRecord(self)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 449, in __init__
self.connection = self.__connect()
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/pool.py", line 602, in __connect
connection = self.__pool._invoke_creator(self)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 97, in connect
return dialect.connect(*cargs, **cparams)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 385, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/Users/rog/.virtualenvs/catwatch/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: role "catwatch" does not exist
So now I'm stuck!
Thanks for the great project, Nick. I look forward to the finished product!
Implement the support form mailer. This was a place holder in the earliest releases.
The twitter module will be accountable for:
More useful information will be logged for each request, such as request duration, endpoint hit, etc..
Previously there was no Dockerfile
because the app was running inside of virtualenv. This is ok for development because you'll likely want your app code to be on your workstation directly so you can use debuggers and other useful tools.
However in production your app along with celery will be in their own container. Implement a Dockerfile
that allows you to build both an app and celery docker image.
The user model should be adjusted so we can keep track of:
Step 12/12 : CMD ["gunicorn", "-c", "python:config.gunicorn", "snakeeyes.app:create_app()"]
---> Using cache
---> aa738214880c
Successfully built aa738214880c
Successfully tagged snakeeyes_worker:latest
Creating snakeeyes_redis_1 ... done Creating snakeeyes_worker_1 ...
Creating snakeeyes_web_1 ... error
Creating snakeeyes_worker_1 ... error le. (Exception from HRESULT: 0x803E0105)"}
ERROR: for snakeeyes_worker_1 Cannot create container for service worker: status code not OK but 500: {"Message":"Unhandled exception: The notification platform is unavailable. (Exception from HRESULT: 0x803E0105)"}
ERROR: for web Cannot create container for service web: status code not OK but 500: {"Message":"Unhandled exception: The notification platform is unavailable. (Exception from HRESULT: 0x803E0105)"}
ERROR: for worker Cannot create container for service worker: status code not OK but 500: {"Message":"Unhandled exception: The notification platform is unavailable. (Exception from HRESULT: 0x803E0105)"}
ERROR: Encountered errors while bringing up the project.
Trying to install the project, I get:
# docker-compose up
Illegal instruction: 4
For sure is only that I'm a complete Docker newbie. Probably I didn't "Edit docker-compose.yml and setup a local volume for Postgres/Redis" properly, as I just installed Docker from the Docker site installer for Mac OSX and executed the "Docker Quickstart Terminal" binary.
Ty!
The billing blueprint will be modified to do the following:
Update: Striked items are complete and on master.
Hi,
docker-compose up --build
gives me
ERROR: Invalid interpolation format for "build" option in service "x-app": "FLASK_ENV=${FLASK_ENV:-production}"
Ubuntu 18.04.6 LTS
Docker version 20.10.12, build e91ed57
docker-compose version 1.21.2, build a133471
Thanks for any help to get this going
Getting a ImportError: No module named snakeeyes.blueprints.contact when trying to use it with docker. I have not changed any code. Just pulled the code and ran it as in the document.
Let me know if you have any idea how to solve this.
Hello,
We've just started looking for ways to provide our solution (Orienteer) as a service.
Your project looks great and seems to be exactly what we needed in!
But there are several questions:
Thanks for your great project!
It would be great to add an LB infront of web & db services in order to use docker scaling functionality docker-compose scale web=2 , docker-compose scale db=3
Hi Nick,
I'm trying to run the app on OSX.
When I try to initialise the database I keep getting:
elieh$ run db reset catwatch catwatch_test
Error importing module db:
db
I ran docker-compose up beforehand.
Any ideas?
gunicorn
does not run on Windows 10 and I can't install docker
because I only have Windows 10 Home Edition and docker
requires Windows 10 Pro. So I'm trying to use waitress
instead of gunicorn
. Do you know what the equivalent command would be to:
gunicorn -b 0.0.0.0:8000 --access-logfile - "snakeeyes.app:create_app()"
for waitress
?
I'm also not sure from which directory I am supposed to be running this command from.
I am really looking forward to the official launch. In the meantime, perhaps you could put links to:
๐
Has anyone found a quick fix for the vboxsf mounts on OS X that stuckeyr pointed out in #18 ?
The script he linked to uses the now deprecated boot2docker to mount the share as nfs within the host vm.
Is that still the only route to go?
In the interim, just to get it running, I was just commenting out the volumes settings. Correct me if I'm wrong, but that should just disable data persistence, right?
After doing that, I'm getting the following output when trying to run db reset:
dropdb: database removal failed: ERROR: database "exampleproject" does not exist
CREATE ROLE
Traceback (most recent call last):
...
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "postgres" to address: nodename nor servname provided, or not known
The postgres container output is:
postgres_1 | ERROR: database "exampleproject" does not exist
postgres_1 | STATEMENT: DROP DATABASE exampleproject;
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.