- Create a virtualenv either using
virtualenvorvirtualenvwrapperor any other env managermkvirtualenv -p python3 video-catalog-project
- Activate your env
workon video-catalog-project
- Enter your github account
- Enter Project page
- Click on
Forkbutton to make a fork of repository in your account
First Setup your public key in your profile if you didn't before Then:
git clone git@github.com:AnisaAdvancedDjangoClass/video-catalog.gitsudo apt install apt-transport-https ca-certificates curl software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"sudo apt install docker-cesudo usermod -aG docker ${USER}su - ${USER}sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composeecho -e '{\n"registry-mirrors": ["https://dockerhub.ir"] \n}' | sudo tee /etc/docker/daemon.jsonsudo systemctl restart docker.service- Enter project directory with virtualenv enabled
- Install PostgreSQL bindings
- if you can install system package first install postgres and python C headers:
then install
sudo apt install libpq-dev python3-dev
psycopg2pip install psycopg2
- Otherwise only install
psycopg2-binarypip install psycopg2-binary
- if you can install system package first install postgres and python C headers:
- Import
requirements.txtpip install -r requirements.txt
- Start docker containers
docker-compose up -d
- Apply migrations
python manage.py migrate