Everything in this application is preconfigured to use host names from our docker-compose.yml.
docker-compose up
Do the following setup in the api
directory.
virtualenv venv -p python3
source venv/bin/activate
You will also need to know how to deactivate your virtual environment later, which can be done by running the following:
deactivate
Option 1:
pip install -r requirements.txt
If Option 1 does not run currectly try the following:
pip3 install -r requirements.txt
Currently this application uses a postgres database, but for local development if may be quicker for you to use SQLite.
Open api/settings.py
If you would like to use SQLite, uncomment the SQLite config. If you would like to use postgres, enter your postgres information.
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql',
# 'NAME': 'db',
# 'USER': 'postgres',
# 'PASSWORD': '1234',
# 'HOST': 'db',
# 'PORT': 5432,
# }
# }
python manage.py migrate
python manage.py runserver 0.0.0.0:8000