1
resposta

Erro no deploy com Fly.io

#8 5.753      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 94.9 MB/s eta 0:00:00
#8 5.819 Collecting django-filter==22.1
#8 5.830   Downloading django_filter-22.1-py3-none-any.whl (80 kB)
#8 5.835      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 kB 31.4 MB/s eta 0:00:00
#8 5.855 Collecting django-heroku==0.3.1
#8 5.860   Downloading django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
#8 5.913 Collecting djangorestframework==3.14.0
#8 5.920   Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
#8 5.933      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 105.2 MB/s eta 0:00:00
#8 6.078 Collecting Faker==17.3.0
#8 6.088   Downloading Faker-17.3.0-py3-none-any.whl (1.7 MB)
#8 6.106      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 108.4 MB/s eta 0:00:00
#8 6.147 Collecting gunicorn==20.0.4
#8 6.155   Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
#8 6.159      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 kB 31.2 MB/s eta 0:00:00
#8 6.229 Collecting isort==4.3.21
#8 6.234   Downloading isort-4.3.21-py2.py3-none-any.whl (42 kB)
#8 6.239      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.3/42.3 kB 16.8 MB/s eta 0:00:00
#8 6.329 Collecting lazy-object-proxy==1.4.3
#8 6.338   Downloading lazy-object-proxy-1.4.3.tar.gz (34 kB)
#8 6.355   Installing build dependencies: started
#8 9.003   Installing build dependencies: finished with status 'done'
#8 9.006   Getting requirements to build wheel: started
#8 9.501   Getting requirements to build wheel: finished with status 'done'
#8 9.504   Preparing metadata (pyproject.toml): started
#8 10.11   Preparing metadata (pyproject.toml): finished with status 'done'
#8 10.13 Collecting mccabe==0.6.1
#8 10.14   Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
#8 10.23 Collecting psycopg2==2.9.1
#8 10.24   Downloading psycopg2-2.9.1.tar.gz (379 kB)
#8 10.25      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 380.0/380.0 kB 78.7 MB/s eta 0:00:00
#8 10.32   Preparing metadata (setup.py): started
#8 11.23   Preparing metadata (setup.py): finished with status 'error'
#8 11.24   error: subprocess-exited-with-error
#8 11.24
#8 11.24   × python setup.py egg_info did not run successfully.
#8 11.24   │ exit code: 1
#8 11.24   ╰─> [25 lines of output]
#8 11.24       /usr/local/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
#8 11.24         warnings.warn(msg, warning_class)
#8 11.24       running egg_info
#8 11.24       creating /tmp/pip-pip-egg-info-nh1lalb4/psycopg2.egg-info
#8 11.24       writing /tmp/pip-pip-egg-info-nh1lalb4/psycopg2.egg-info/PKG-INFO
#8 11.24       writing dependency_links to /tmp/pip-pip-egg-info-nh1lalb4/psycopg2.egg-info/dependency_links.txt
#8 11.24       writing top-level names to /tmp/pip-pip-egg-info-nh1lalb4/psycopg2.egg-info/top_level.txt
#8 11.24       writing manifest file '/tmp/pip-pip-egg-info-nh1lalb4/psycopg2.egg-info/SOURCES.txt'
#8 11.24
#8 11.24       Error: pg_config executable not found.
#8 11.24
#8 11.24       pg_config is required to build psycopg2 from source.  Please add the directory
#8 11.24       containing pg_config to the $PATH or specify the full executable path with the
#8 11.24       option:
#8 11.24
#8 11.24           python setup.py build_ext --pg-config /path/to/pg_config build ...
#8 11.24
#8 11.24       or with the pg_config option in 'setup.cfg'.
#8 11.24
#8 11.24       If you prefer to avoid building psycopg2 from source, please install the PyPI
#8 11.24       'psycopg2-binary' package instead.
#8 11.24
#8 11.24       For further information please check the 'doc/src/install.rst' file (also at
#8 11.24       <https://www.psycopg.org/docs/install.html>).
#8 11.24
#8 11.24       [end of output]
#8 11.24
#8 11.24   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 11.24 error: metadata-generation-failed
#8 11.24
#8 11.24 × Encountered error while generating package metadata.
#8 11.24 ╰─> See above for output.
#8 11.24
#8 11.24 note: This is an issue with the package mentioned above, not pip.
#8 11.24 hint: See above for details.
------
**Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c set -ex &&     pip install --upgrade pip &&     pip install -r /tmp/requirements.txt &&     rm -rf /root/.cache/]: exit code: 1**

Conforme o passo a passo após o comando fly deploy ocorre o erro abaixo Insira aqui a descrição dessa imagem para ajudar na acessibilidade

1 resposta

Olá Everton, tudo bem com você?

Peço desculpas pela demora em obter um retorno.

A partir do dia 28 de agosto de 2022 o Heroku deixou de ser gratuito. Por isto, realizamos uma atualização na aula, ensinando agora, a fazer o deploy em outro serviço - a AWS (Amazon Web Services), que possui uma cota de uso gratuito.

Te convido a conhecer este novo material para continuar alavancando sua aprendizagem e conhecimento em deploys. Para acessar a aula, clique neste link: Aula - Configurando o projeto para o deploy na AWS

Espero ter ajudado. Grande abraço e bons estudos!

Caso este post tenha lhe ajudado, por favor, marcar como solucionado ✓. Bons Estudos!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software