Skip to content

Commit

Permalink
fix: CI repo secrete > env
Browse files Browse the repository at this point in the history
  • Loading branch information
fan9704 committed Sep 8, 2023
1 parent 2d96c99 commit 5036b18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/django-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
PYTHON_VERSION: "3.10"
DOCKER_REPO: "pet-monitoring-system-backend"
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
Expand Down
9 changes: 5 additions & 4 deletions PetMonitoringSystemBackend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,25 @@
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv('SECRET_KEY', '123456')
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv('DEBUG', True)

ALLOWED_HOSTS = ["127.0.0.1", "*", '.vercel.app']
ALLOWED_HOSTS = ["127.0.0.1", "140.125.207.230", '.vercel.app']
# CORS Settings
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOWED_ORIGINS = [
"http://localhost:4200",
"http://127.0.0.1:4200",
"http://140.125.207.230:3000",
]
CORS_ALLOWED_HEADERS = "*"
CORS_ORIGIN_ALLOW_METHODS = "*"
CORS_ORIGIN_WHITELIST = [
"http://localhost:8000",
"http://127.0.0.1:8000"
"http://127.0.0.1:8000",
"http://140.125.207.230:8000",
]

# Application definition
Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ pip freeze > requirements.txt
### Run Integration Test

```shell
python manage.py test PetMonitoringSystemBackend.test [--verbosity 2]# Unit Test --verbosity 2 is output detail
python manage.py test api.tests.unit [--verbosity 2]# Unit Test --verbosity 2 is output detail
python manage.py test api.tests.integration #Intergration Test
python manage.py test #All Test
Expand Down

0 comments on commit 5036b18

Please sign in to comment.