diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 817c6cf..4d8833e 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -9,7 +9,8 @@ on: branches: - main -# env: +env: + CICD: true # HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} # HEROKU_APP_NAME: your-heroku-app-name diff --git a/README.md b/README.md index 4aaffaa..515c43f 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,11 @@ Run bash inside the application container. Run ```docker exec -it tournament-api ### Seed Database -`python3 manage.py shell < seed.py` \ No newline at end of file +`python3 manage.py shell < seed.py` + +#### Seed Fixtures + +`manage.py loaddata fixtures/player.json` +`manage.py loaddata fixtures/position.json` +`manage.py loaddata fixtures/tournament.json` + diff --git a/tournament_api/settings.py b/tournament_api/settings.py index 6b10494..4aac916 100644 --- a/tournament_api/settings.py +++ b/tournament_api/settings.py @@ -25,6 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.environ.get('DEBUG', True) +CICD = os.environ.get('CICD', False) ALLOWED_HOSTS = [ 'elimination-tournament.onrender.com', @@ -95,15 +96,15 @@ WSGI_APPLICATION = 'tournament_api.wsgi.application' ASGI_APPLICATION = "tournament_api.asgi.application" - -CHANNEL_LAYERS = { - "default": { - "BACKEND": "channels_redis.core.RedisChannelLayer", - "CONFIG": { - "hosts": [("redis", 6379)], +if not CICD: + CHANNEL_LAYERS = { + "default": { + "BACKEND": "channels_redis.core.RedisChannelLayer", + "CONFIG": { + "hosts": [("redis", 6379)], + }, }, - }, -} + } # https://docs.djangoproject.com/en/4.2/ref/settings/#databases