pipenv: deployment workflow

后端 未结 5 757
独厮守ぢ
独厮守ぢ 2021-02-01 19:17

I am thinking about switching from pip & virtualenv to pipenv. But after studying the documentation I am still at a loss on how the creators of pipenv structured the deploy

5条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 19:39

    I think pipenv is very good for managing dependencies but is too slow, cumbersome and still a bit unstable for using it for automatic deployments.

    Instead I use virtualenv (or virtualenvwrapper) and pip on the target machine.

    • On my build/development machine I create a requirements.txt compatible text file using pipenv lock -r:

        $ pipenv lock -r > deploy-requirements.txt
      
    • While deploying, inside a virtualenv I run:

        $ pip install -r deploy-requirements.txt
      

提交回复
热议问题