diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 514df728..429d462e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ "neo" ] + branches: [ "master" ] pull_request: # The branches below must be a subset of the branches above - branches: [ "neo" ] + branches: [ "master" ] schedule: - cron: '35 0 * * 0' diff --git a/.github/workflows/pysa.yml b/.github/workflows/pysa.yml index e4e20af3..50e8865b 100644 --- a/.github/workflows/pysa.yml +++ b/.github/workflows/pysa.yml @@ -17,9 +17,9 @@ name: Pysa on: workflow_dispatch: push: - branches: [ "neo" ] + branches: [ "master" ] pull_request: - branches: [ "neo" ] + branches: [ "master" ] schedule: - cron: '45 12 * * 4' diff --git a/.gitignore b/.gitignore index d1edae82..4d9446ad 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ log # conf folder for neodb /neodb + +# typesense folder +/typesense-data diff --git a/Dockerfile b/Dockerfile index cc9bf6e8..5115d87f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt \ && useradd -U app_user \ && install -d -m 0755 -o app_user -g app_user /app/static -ENV DJANGO_SETTINGS_MODULE=neodb.dev +ENV DJANGO_SETTINGS_MODULE=yoursettings.dev WORKDIR /app USER app_user:app_user COPY --chown=app_user:app_user . . diff --git a/boofilsic/settings.py b/boofilsic/settings.py index 6393f4a0..bab03dbf 100644 --- a/boofilsic/settings.py +++ b/boofilsic/settings.py @@ -12,7 +12,6 @@ https://docs.djangoproject.com/en/3.0/ref/settings/ import os import psycopg2.extensions -from git import Repo # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -67,7 +66,6 @@ INSTALLED_APPS = [ 'timeline.apps.TimelineConfig', 'easy_thumbnails', 'user_messages', - 'django_slack', ] MIDDLEWARE = [ @@ -113,9 +111,9 @@ if DEBUG: 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': os.environ.get('DB_NAME', 'test'), - 'USER': os.environ.get('DB_USER', 'donotban'), - 'PASSWORD': os.environ.get('DB_PASSWORD', 'donotbansilvousplait'), - 'HOST': os.environ.get('DB_HOST', '172.18.116.29'), + 'USER': os.environ.get('DB_USER', 'postgres'), + 'PASSWORD': os.environ.get('DB_PASSWORD', 'admin123'), + 'HOST': os.environ.get('DB_HOST', '127.0.0.1'), 'OPTIONS': { 'client_encoding': 'UTF8', # 'isolation_level': psycopg2.extensions.ISOLATION_LEVEL_DEFAULT, @@ -280,26 +278,27 @@ LUMINATI_PASSWORD = 'nsb7te9bw0ney' SCRAPING_TIMEOUT = 90 # ScraperAPI api key -SCRAPERAPI_KEY = 'wnb3794v675b8w475h0e8hr7tyge' +SCRAPERAPI_KEY = '***REMOVED***' PROXYCRAWL_KEY = None SCRAPESTACK_KEY = None # Spotify credentials -SPOTIFY_CREDENTIAL = "NzYzNkYTE6MGQ0ODY0NTY2Y2b3n645sdfgAyY2I1ljYjg3Nzc0MjIwODQ0ZWE=" +SPOTIFY_CREDENTIAL = "***REMOVED***" # IMDb API service https://imdb-api.com/ -IMDB_API_KEY = "k23fwewff23" +IMDB_API_KEY = "***REMOVED***" # The Movie Database (TMDB) API Keys -TMDB_API3_KEY = "deadbeef" -TMDB_API4_KEY = "deadbeef.deadbeef.deadbeef" +TMDB_API3_KEY = "***REMOVED***" +# TMDB_API4_KEY = "deadbeef.deadbeef.deadbeef" # Google Books API Key -GOOGLE_API_KEY = 'deadbeef-deadbeef-deadbeef' +GOOGLE_API_KEY = '***REMOVED***' # IGDB -IGDB_CLIENT_ID = 'deadbeef' -IGDB_ACCESS_TOKEN = 'deadbeef' +IGDB_CLIENT_ID = '***REMOVED***' +IGDB_SECRET = "***REMOVED***" +IGDB_ACCESS_TOKEN = '***REMOVED***' # Thumbnail setting # It is possible to optimize the image size even more: https://easy-thumbnails.readthedocs.io/en/latest/ref/optimize/ @@ -346,19 +345,18 @@ RQ_SHOW_ADMIN_LINK = True SEARCH_INDEX_NEW_ONLY = False -SEARCH_BACKEND = None # SEARCH_BACKEND = 'MEILISEARCH' # MEILISEARCH_SERVER = 'http://127.0.0.1:7700' # MEILISEARCH_KEY = 'deadbeef' -# SEARCH_BACKEND = 'TYPESENSE' -# TYPESENSE_CONNECTION = { -# 'api_key': 'deadbeef', -# 'nodes': [{ -# 'host': 'localhost', -# 'port': '8108', -# 'protocol': 'http' -# }], -# 'connection_timeout_seconds': 2 -# } +SEARCH_BACKEND = 'TYPESENSE' +TYPESENSE_CONNECTION = { + 'api_key': 'xyz', + 'nodes': [{ + 'host': 'localhost', + 'port': '8108', + 'protocol': 'http' + }], + 'connection_timeout_seconds': 2 +} diff --git a/books/models.py b/books/models.py index 8b23e9a6..2b1caeaf 100644 --- a/books/models.py +++ b/books/models.py @@ -160,7 +160,7 @@ class BookReview(Review): @property def url(self): - return settings.APP_WEBSITE + reverse("books:retrieve_review", args=[self.id]) + return reverse("books:retrieve_review", args=[self.id]) @property def item(self): diff --git a/books/templates/books/create_update.html b/books/templates/books/create_update.html index de4b8ca7..f48cd4b9 100644 --- a/books/templates/books/create_update.html +++ b/books/templates/books/create_update.html @@ -11,7 +11,7 @@