The first time an error occurs

when running tutor local quickstart, it does not start completely
after doing tutor local stop and tutor local start
I see this picture in the console

 2020-01-06 17:06:44,382 ERROR 155 [root] signals.py:21 - Uncaught exception from None
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
lms_1             | DoesNotExist: Site matching query does not exist.
lms_1             | 2020-01-06 17:06:44,388 ERROR 155 [django.request] exception.py:135 - Internal Server Error: /
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
_______________________________
2020-01-06 17:06:41,026 WARNING 154 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
lms_1             | 2020-01-06 17:06:41,029 WARNING 154 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
lms_1             | 2020-01-06 17:06:41,048 WARNING 155 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
lms_1             | 2020-01-06 17:06:41,048 WARNING 155 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
cms_1             | 2020-01-06 17:06:41,138 WARNING 141 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
cms_1             | 2020-01-06 17:06:41,139 WARNING 142 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
cms_1             | 2020-01-06 17:06:41,139 WARNING 141 [enterprise.utils] utils.py:51 - cannot import name EnterpriseCustomerUser
cms_1             | 2020-01-06 17:06:41,143 WARNING 142 [enterprise.utils] utils.py:51 - cannot import name EnterpriseCustomerUser

__________________________________
 | WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
lms_1             |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
lms_1             |
lms_1             | WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
lms_1             |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
lms_1             |
cms_1             | WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
cms_1             |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
cms_1             |
cms_1             | WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
cms_1             |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
cms_1             |
forum_1           | 2020/01/06 17:06:23 Received 404 from http://elasticsearch:9200/content. Sleeping 5s
cms_worker_1      | 2020-01-06 17:06:23,541 WARNING 1 [py.warnings] platforms.py:812 - /openedx/venv/local/lib/python2.7/site-packages/celery/platforms.py:812: RuntimeWarning: You are running the worker with superuser privileges, which is
cms_worker_1      | absolutely not recommended!

help me please =)

What do you mean? What is the output of tutor local quickstart?
Your platform is not running correctly because not all database migrations were run (“Site matching query does not exist”). Database migrations are run as part of tutor local quickstart, so you should definitely have a working quickstart before you actually start the platform.

The output of tutor local quickstart

Configuration saved to /root/.local/share/tutor/config.yml
================================================
        Updating the current environment
================================================
Environment generated in /root/.local/share/tutor/env
==============================================
        Stopping any existing platform
==============================================
docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local rm --stop --force
No stopped containers
=============================================
        HTTPS certificates generation
=============================================
HTTPS is not activated: certificate generation skipped
======================================================
        Starting the platform in detached mode
======================================================
docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local up --remove-orphans -d
Creating tutor_local_elasticsearch_1  ... done
Creating tutor_local_mysql_1          ... done
Creating tutor_local_rabbitmq_1       ... done
Creating tutor_local_mongodb_1        ... done
Creating tutor_local_openedx-assets_1 ... done
Creating tutor_local_memcached_1      ... done
Creating tutor_local_smtp_1           ... done
Creating tutor_local_forum_1          ... done
Creating tutor_local_cms_1            ... done
Creating tutor_local_lms_1            ... done
Creating tutor_local_cms_worker_1     ... done
Creating tutor_local_lms_worker_1     ... done
Creating tutor_local_nginx_1          ... done
================================================
        Database creation and migrations
================================================
Initialising all services...
docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local exec mysql sh -e -c echo "Initialising MySQL..."
mysql_connection_max_attempts=10
mysql_connection_attempt=0
until mysql -u root --password="TeIJ0PgI" --host "mysql" --port 3306 -e 'exit'
do
    mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
    echo "    [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)..."
    if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
    then
      echo "MySQL initialisation error" 1>&2
      exit 1
    fi
    sleep 10
done
echo "MySQL is up and running"

mysql -u root --password="TeIJ0PgI" --host "mysql" --port 3306 -e 'CREATE DATABASE IF NOT EXISTS openedx;'
mysql -u root --password="TeIJ0PgI" --host "mysql" --port 3306 -e 'GRANT ALL ON openedx.* TO "openedx"@"%" IDENTIFIED BY "85nFNSCT";'
Initialising MySQL...
Warning: Using a password on the command line interface can be insecure.
MySQL is up and running
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
Initialising lms...
docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS
echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py lms migrate

./manage.py lms create_oauth2_client \
    "http://androidapp.com" "http://androidapp.com/redirect" public \
    --client_id android --client_secret BCdRqioeR943DirQNFb58UDP \
    --trusted

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating LMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi
2020/01/09 06:38:20 Waiting for: tcp://mysql:3306
2020/01/09 06:38:21 Connected to tcp://mysql:3306
Loading settings lms.envs.tutor.production
WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)

2020-01-09 06:39:22,104 WARNING 27 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
2020-01-09 06:39:22,106 WARNING 27 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
Operations to perform:
  Apply all migrations: admin, api_admin, assessment, auth, badges, block_structure, bookmarks, branding, bulk_email, catalog, celery_utils, certificates, commerce, completion, consent, content_type_gating, contentserver, contenttypes, cors_csrf, course_action_state, course_duration_limits, course_goals, course_groups, course_modes, course_overviews, courseware, crawlers, credentials, credit, dark_lang, database_fixups, degreed, django_comment_common, django_notify, django_openid_auth, djcelery, edx_oauth2_provider, edx_proctoring, edxval, email_marketing, embargo, enterprise, entitlements, experiments, external_auth, grades, instructor_task, integrated_channel, lms_xblock, microsite_configuration, milestones, mobile_api, notes, oauth2, oauth2_provider, oauth_dispatch, oauth_provider, organizations, programs, redirects, rss_proxy, sap_success_factors, schedules, self_paced, sessions, shoppingcart, site_configuration, sites, social_django, splash, static_replace, status, student, submissions, survey, teams, theming, third_party_auth, track, user_api, user_authn, util, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_django
Running migrations:
  Applying third_party_auth.0004_add_visible_field...Traceback (most recent call last):
  File "./manage.py", line 123, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 88, in database_forwards
    field,
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/schema.py", line 48, in add_field
    super(DatabaseSchemaEditor, self).add_field(model, field)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 445, in add_field
    self.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 136, in execute
    cursor.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 101, in execute
    return self.cursor.execute(query, args)
  File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.OperationalError: (1060, "Duplicate column name 'visible'")
Error: Command failed with status 1: docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS
echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py lms migrate

./manage.py lms create_oauth2_client \
    "http://androidapp.com" "http://androidapp.com/redirect" public \
    --client_id android --client_secret BCdRqioeR943DirQNFb58UDP \
    --trusted

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating LMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi

when checking ’ tutor local logs -f ’
forum_1

2020/01/09 12:40:43 Received 404 from http://elasticsearch:9200/content. Sleeping 5s

lms_1

lms_1             | 2020-01-09 12:40:38,918 ERROR 344 [root] signals.py:21 - Uncaught exception from None
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
lms_1             | DoesNotExist: Site matching query does not exist.
lms_1             | 2020-01-09 12:40:38,918 ERROR 344 [django.request] exception.py:135 - Internal Server Error: /login
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
lms_1             | DoesNotExist: Site matching query does not exist.
lms_1             | 89.106.171.114 - - [09/Jan/2020:12:40:39 +0000] "GET /login?next=%2F HTTP/1.0" 500 8729 "http://im-smm.ru/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
nginx_1           | 89.106.171.114 - - [09/Jan/2020:12:40:39 +0000] "GET /login?next=%2F HTTP/1.1" 500 8729 "http://im-smm.ru/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" "-"

It looks like your SQL database is corrupt. Please take a look at the following answer, which answers the same problem: Error on ecommerce launch

The problem line has crossed, now another problem has arisen =(

Applying experiments.0002_auto_20170627_1402... OK
  Applying experiments.0003_auto_20170713_1148... OK
  Applying external_auth.0001_initial... OK
  Applying grades.0001_initial... OK
  Applying grades.0002_rename_last_edited_field... OK
  Applying grades.0003_coursepersistentgradesflag_persistentgradesenabledflag...Traceback (most recent call last):
  File "./manage.py", line 123, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 97, in database_forwards
    schema_editor.create_model(model)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 322, in create_model
    self.deferred_sql.extend(self._model_indexes_sql(model))
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 937, in _model_indexes_sql
    output.extend(self._field_indexes_sql(model, field))
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 952, in _field_indexes_sql
    if self._field_should_be_indexed(model, field):
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/schema.py", line 62, in _field_should_be_indexed
    self.connection.cursor(), model._meta.db_table
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/introspection.py", line 162, in get_storage_engine
    "WHERE table_name = %s", [table_name])
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 101, in execute
    return self.cursor.execute(query, args)
  File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')
Error: Command failed with status 1: docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS
echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py lms migrate

./manage.py lms create_oauth2_client \
    "http://androidapp.com" "http://androidapp.com/redirect" public \
    --client_id android --client_secret BCdRqioeR943DirQNFb58UDP \
    --trusted

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating LMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi

tutor local logs -f (moment of attempt to go to the web page)

lms_1             | 2020-01-10 07:45:15,616 ERROR 302 [root] signals.py:21 - Uncaught exception from None
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
lms_1             | DoesNotExist: Site matching query does not exist.
lms_1             | 2020-01-10 07:45:15,617 ERROR 302 [django.request] exception.py:135 - Internal Server Error: /
lms_1             | Traceback (most recent call last):
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1             |     response = get_response(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
lms_1             |     response = middleware_method(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/middleware.py", line 12, in process_request
lms_1             |     request.site = get_current_site(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
lms_1             |     return Site.objects.get_current(request)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 44, in patched_get_current
lms_1             |     return self._get_site_by_id(settings.SITE_ID)  # pylint: disable=protected-access
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django_sites_extensions/models.py", line 69, in patched_get_site_by_id
lms_1             |     site = self.get(pk=site_id)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
lms_1             |     return getattr(self.get_queryset(), name)(*args, **kwargs)
lms_1             |   File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get
lms_1             |     self.model._meta.object_name
lms_1             | DoesNotExist: Site matching query does not exist.
lms_1             | 172.18.0.14 - - [10/Jan/2020:07:45:15 +0000] "GET / HTTP/1.0" 500 - "-" "-"
nginx_1           | 89.106.171.114 - - [10/Jan/2020:07:45:15 +0000] "GET / HTTP/1.1" 500 141 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" "-"

This is why you are ending up with a corrupt database. The MySQL container crashes halfway through migrations. This is most likely due to insufficient memory. How much RAM do you have?

2gb
what are the minimum requirements?

4Gb https://docs.tutor.overhang.io/install.html#requirements