This is a beginner question, but I haven't found the answer. I'd like to transfer my django project from virtual machine with Ubuntu 18.04 to another virtual machine with Ubuntu 18.04.
This is the example directory structure
pd_videowebapp/
├── db.sqlite3
├── env
│ ├── bin
│ ├── lib
│ └── pyvenv.cfg
├── manage.py
├── media
│ ├── images
│ └── video
├── mysite
│ ├── core
│ ├── __init__.py
│ ├── __pycache__
│ ├── settings.py
│ ├── static
│ ├── templates
│ ├── urls.py
│ └── wsgi.py
├── Pipfile
├── requirements.txt
└── static
├── admin
├── style2.css
└── style3.css
In env directory there is a Python virtual environment.
Before I transfer it I would run
$ pip freeze > requirements.txt
Then I would zip all the directory structure except for db.sqlite3 and media directory.
Then unzip it on another VM.
Then copy the db.sqlite3 and media directory to the right place.
Then create a virtual environment on another VM.
Then run
$ pip install -r requirements.txt
Or should I rather copy the whole project with env directory in the beginning? What is better? Did I omit something? Or is there a better approach?