revoke keys and replace them by env variable
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
pierre geeraert
2026-06-25 23:09:37 +01:00
parent ad9c6c7a2a
commit 623bc9b74e
2 changed files with 22 additions and 5 deletions
+18 -2
View File
@@ -17,9 +17,25 @@ python django_code/manage.py migrate --database=redirect_db
python django_code/manage.py migrate --database=job_db
```
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
### Setup virtualenv variables
edit venv/bin/activate or .env/bin/activate
and add the following code
```
export DB_HOST=localhost
export DB_PORT=5432
export DB_USERNAME=postgres
export DB_PASSWORD=example
export DB_DATABASE=cloudmanager
export CUSTOM_DB_DATABASE=cloudmanager
export ALLOWED_HOSTS="0.0.0.0,localhost,127.0.0.1"
export DEBUG=true
export bitwarden_access_token="PROVIDED IN BITWARDEN ADMIN INTERFACE"
export bitwarden_organization_id=""
```
## Add your files
+4 -3
View File
@@ -1,6 +1,7 @@
import requests
import hashlib
from apps.bitwarden.utils import bitwardenUtils
import os
class betaserieUtils():
url = "https://api.betaseries.com/members/auth"
@@ -12,10 +13,10 @@ class betaserieUtils():
#Adding __ to make the variable private and can't be access outside the class,
# only by the class itself ot the subclass
__access_token = "0.7720f24b-4328-41ef-b70b-b419018270a3.nhBoRMSkfrlxqJVZ9W0W1g3lNFrmfI:35muVQz2mO3coR46bIZgcQ=="
__organization_id = "a6361589-badd-4bde-9cb4-af8901161c0d"
__bitwarden_access_token = os.environ.get('bitwarden_access_token')
__bitwarden_organization_id = os.environ.get('bitwarden_organization_id')
bw = bitwardenUtils(__access_token,__organization_id)
bw = bitwardenUtils(__bitwarden_access_token,__bitwarden_organization_id)
__betaserie_username = bw.read_value_secret(username_UID)
__betaserie_md5_password = bw.read_value_secret(password_UID)