web set of configuration and deployment issues

1, sometimes the system installation heroku, but in order not break below the command.

The reason may be inadequate heroku installation directory, it is best to heroku installed outside the project folder.

2、Heroku: “No default language could be detected for this app” error thrown for node app

The error is the meaning: " no default language for the application can be detected" error thrown node application

solution:

Directory might be a problem. I just started a directory is wblog following two files, .idea / and wblog /, wblog / below is the real project, to establish a Git repository is the first wblog /, later changed to the second wblog / as warehouse, and finally the problem is solved.

3, pushed heroku error heroku config: set DISABLE_COLLECTSTATIC = 1

Reference Hirofumi: https: //blog.csdn.net/wbdxz/article/details/81261648

4, the file is too large, upload failed fatal: the remote end hung up unexpectedly

 

solution:

Execution: git config --global HTTP .postBuffer 2.428 million can be.

5, git push heroku master error

 1 D:\pycharm\pycharm projects\wblog\wblog>git push heroku master
 2 Enumerating objects: 84, done.
 3 Counting objects: 100% (84/84), done.
 4 Delta compression using up to 8 threads
 5 Compressing objects: 100% (76/76), done.
 6 Writing objects: 100% (84/84), 34.45 KiB | 440.00 KiB/s, done.
 7 Total 84 (delta 7), reused 0 (delta 0)
 8 remote: Compressing source files... done.
 9 remote: Building source:
10 remote: 
11 remote: -----> Python app detected
12 remote:  !     Requested runtime (python-3.5.1) is not available for this stack (heroku-18).
13 remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
14 remote:  !     Push rejected, failed to compile Python app.
15 remote: 
16 remote:  !     Push failed
17 remote: Verifying deploy...
18 remote: 
19 remote: !       Push rejected to shielded-brook-99547.
20 remote: 
21 To https://git.heroku.com/shielded-brook-99547.git
22  ! [remote rejected] master -> master (pre-receive hook declined)
23 error: failed to push some refs to 'https://git.heroku.com/shielded-brook-99547.git'

solution:

I runtime.txt inside the python changed to 3.6.8

Then there will be some mistakes,

  1 D:\pycharm\pycharm projects\wblog\wblog>git push heroku master
  2 Enumerating objects: 92, done.
  3 Counting objects: 100% (92/92), done.
  4 Delta compression using up to 8 threads
  5 Compressing objects: 100% (83/83), done.
  6 Writing objects: 100% (92/92), 35.78 KiB | 563.00 KiB/s, done.
  7 Total 92 (delta 12), reused 0 (delta 0)
  8 remote: Compressing source files... done.
  9 remote: Building source:
 10 remote:
 11 remote: -----> Python app detected
 12 remote:  !     Python has released a security update! Please consider upgrading to python-3.6.8
 13 remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
 14 remote: -----> Installing python-3.6.8
 15 remote: -----> Installing pip
 16 remote: -----> Installing SQLite3
 17 remote: -----> Installing requirements with pip
 18 remote:        Collecting appdirs==1.4.3 (from -r /tmp/build_8d23071551bb05a006e5bf4b580e171b/requirement
 19 s.txt (line 1))
 20 remote:          Downloading https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e2
 21 8cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
——snip——
 64 remote:
 65 remote: -----> $ python manage.py collectstatic --noinput
 66 remote:        Traceback (most recent call last):
 67 remote:          File "manage.py", line 21, in <module>
 68 remote:            main()
 69 remote:          File "manage.py", line 17, in main
 70 remote:            execute_from_command_line(sys.argv)
 71 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py
 72 ", line 381, in execute_from_command_line
 73 remote:            utility.execute()
 74 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py
 75 ", line 375, in execute
 76 remote:            self.fetch_command(subcommand).run_from_argv(self.argv)
 77 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", l
 78 ine 323, in run_from_argv
 79 remote:            self.execute(*args, **cmd_options)
 80 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", l
 81 ine 364, in execute
 82 remote:            output = self.handle(*args, **options)
 83 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/managem
 84 ent/commands/collectstatic.py", line 188, in handle
 85 remote:            collected = self.collect()
 86 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/managem
 87 ent/commands/collectstatic.py", line 114, in collect
 88 remote:            handler(path, prefixed_path, storage)
 89 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/managem
 90 ent/commands/collectstatic.py", line 342, in copy_file
 91 remote:            if not self.delete_file(path, prefixed_path, source_storage):
 92 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/managem
 93 ent/commands/collectstatic.py", line 249, in delete_file
 94 remote:            if self.storage.exists(prefixed_path):
 95 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/files/storage.py", lin
 96 e 310, in exists
 97 remote:            return os.path.exists(self.path(name))
 98 remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/storage
 99 .py", line 44, in path
100 remote:            raise ImproperlyConfigured("You're using the staticfiles app "
101 remote:        django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without havi
102 ng set the STATIC_ROOT setting to a filesystem path.
103 remote:
104 remote:  !     Error while running '$ python manage.py collectstatic --noinput'.
105 remote:        See traceback above for details.
106 remote:
107 remote:        You may need to update application code to resolve this error.
108 remote:        Or, you can disable collectstatic for this application:
109 remote:
110 remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
111 remote:
112 remote:        https://devcenter.heroku.com/articles/django-assets
113 remote:  !     Push rejected, failed to compile Python app.
114 remote:
115 remote:  !     Push failed
116 remote: Verifying deploy...
117 remote:
118 remote: !       Push rejected to shielded-brook-99547.
119 remote:
120 To https://git.heroku.com/shielded-brook-99547.git
121  ! [remote rejected] master -> master (pre-receive hook declined)
122 error: failed to push some refs to 'https://git.heroku.com/shielded-brook-99547.git'

Then execute

 1 pip install appdirs --upgrade

2 pip freeze > requirements.txt
 

The problem is solved.

Guess you like

Origin www.cnblogs.com/liyanyinng/p/11261174.html