/ap_backend

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Autoparts

TOC

Requirements

  • Docker: 19.03
  • Docker compose: 1.27

Setup

Create .env file

$ cp ./envs/.env.example ./envs/.env

Build services

$ docker-compose build

Run project

$ docker-compose up -d

Create superuser

$ docker-compose exec app ./manage.py createsuperuser

Create eBay credential

$ docker-compose exec app ./manage.py ebay_create_credential APP_ID

Create Google Service Account & GCS

Create Google Service Account with Google Cloud Storage permissions. Export GSA JSON and put into project's folder. Add GOOGLE_SERVICE_ACCOUNT_FILEPATH to .env. Create Google Storage Bucket and add the name of bucket to GS_BUCKET_NAME into .env.

Services

Sentry

Application supports Sentry. Just add SENTRY_DSN variable with DSN provided by Sentry on installation step.

Notes

Migrations and management commands

migrate and collectstatic triggered from entrypoint. For manual usage - run management commands via docker-compose exec app
Example: docker-compose exec app ./manage.py makemigrations