$ brew install pyenv
$ pyenv install 3.7.0
$ pyenv global 3.7.0
$ pip install --upgrade pip
$ git clone https://github.com/milerDev/miler-api
$ cd miler-api
$ python -m venv env
$ . env/bin/activate
(env)
$ python -m pip install --upgrade pip
$ pip install -r requirements.txt
.vscode/settings.json
{
"python.pythonPath": "/Users/minhyeokjung/.pyenv/versions/3.7.0/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.lintOnSave": true
}
$ python manage.py makemigrations
$ python manage.py makemigrations users # Each models
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
$ pytest
$ docker-compose -f docker-compose-pg.yml up -d # PostgresSQL only
$ docker-compose up -d --build
$ docker-compose exec django ./manage.py test
$ docker build -t miler-api .
$ docker run miler-api