forked from github/plane
dev: remove default user
This commit is contained in:
parent
7edaa49c21
commit
3bfbc3a132
@ -116,9 +116,6 @@ USE_MINIO=1
|
|||||||
# Nginx Configuration
|
# Nginx Configuration
|
||||||
NGINX_PORT=80
|
NGINX_PORT=80
|
||||||
|
|
||||||
# Default Creds
|
|
||||||
DEFAULT_EMAIL="captain@plane.so"
|
|
||||||
DEFAULT_PASSWORD="password123"
|
|
||||||
|
|
||||||
# SignUps
|
# SignUps
|
||||||
ENABLE_SIGNUP="1"
|
ENABLE_SIGNUP="1"
|
||||||
|
@ -53,9 +53,6 @@ USE_MINIO=1
|
|||||||
# Nginx Configuration
|
# Nginx Configuration
|
||||||
NGINX_PORT=80
|
NGINX_PORT=80
|
||||||
|
|
||||||
# Default Creds
|
|
||||||
DEFAULT_EMAIL="captain@plane.so"
|
|
||||||
DEFAULT_PASSWORD="password123"
|
|
||||||
|
|
||||||
# SignUps
|
# SignUps
|
||||||
ENABLE_SIGNUP="1"
|
ENABLE_SIGNUP="1"
|
||||||
|
@ -3,7 +3,4 @@ set -e
|
|||||||
python manage.py wait_for_db
|
python manage.py wait_for_db
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
||||||
# Create a Default User
|
|
||||||
python bin/user_script.py
|
|
||||||
|
|
||||||
exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
import os, sys, random, string
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
sys.path.append("/code")
|
|
||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plane.settings.production")
|
|
||||||
import django
|
|
||||||
|
|
||||||
django.setup()
|
|
||||||
|
|
||||||
from plane.db.models import User
|
|
||||||
|
|
||||||
|
|
||||||
def populate():
|
|
||||||
default_email = os.environ.get("DEFAULT_EMAIL", "captain@plane.so")
|
|
||||||
default_password = os.environ.get("DEFAULT_PASSWORD", "password123")
|
|
||||||
|
|
||||||
if not User.objects.filter(email=default_email).exists():
|
|
||||||
user = User.objects.create(email=default_email, username=uuid.uuid4().hex)
|
|
||||||
user.set_password(default_password)
|
|
||||||
user.save()
|
|
||||||
print(f"User created with an email: {default_email}")
|
|
||||||
else:
|
|
||||||
print(f"User already exists with the default email: {default_email}")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
populate()
|
|
@ -30,8 +30,6 @@ x-app-env : &app-env
|
|||||||
- EMAIL_FROM=${EMAIL_FROM:-"Team Plane <team@mailer.plane.so>"}
|
- EMAIL_FROM=${EMAIL_FROM:-"Team Plane <team@mailer.plane.so>"}
|
||||||
- EMAIL_USE_TLS=${EMAIL_USE_TLS:-1}
|
- EMAIL_USE_TLS=${EMAIL_USE_TLS:-1}
|
||||||
- EMAIL_USE_SSL=${EMAIL_USE_SSL:-0}
|
- EMAIL_USE_SSL=${EMAIL_USE_SSL:-0}
|
||||||
- DEFAULT_EMAIL=${DEFAULT_EMAIL:-captain@plane.so}
|
|
||||||
- DEFAULT_PASSWORD=${DEFAULT_PASSWORD:-password123}
|
|
||||||
# OPENAI SETTINGS
|
# OPENAI SETTINGS
|
||||||
- OPENAI_API_BASE=${OPENAI_API_BASE:-https://api.openai.com/v1}
|
- OPENAI_API_BASE=${OPENAI_API_BASE:-https://api.openai.com/v1}
|
||||||
- OPENAI_API_KEY=${OPENAI_API_KEY:-"sk-"}
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-"sk-"}
|
||||||
|
@ -35,8 +35,6 @@ EMAIL_PORT=587
|
|||||||
EMAIL_FROM="Team Plane <team@mailer.plane.so>"
|
EMAIL_FROM="Team Plane <team@mailer.plane.so>"
|
||||||
EMAIL_USE_TLS=1
|
EMAIL_USE_TLS=1
|
||||||
EMAIL_USE_SSL=0
|
EMAIL_USE_SSL=0
|
||||||
DEFAULT_EMAIL=captain@plane.so
|
|
||||||
DEFAULT_PASSWORD=password123
|
|
||||||
|
|
||||||
# OPENAI SETTINGS
|
# OPENAI SETTINGS
|
||||||
OPENAI_API_BASE=https://api.openai.com/v1
|
OPENAI_API_BASE=https://api.openai.com/v1
|
||||||
|
Loading…
Reference in New Issue
Block a user