mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
bdca84bd09
* minor docker fixes * eslint config changes * dockerfile changes to backend and frontend * oauth enabled env flag * sentry enabled env flag * build: get alternatives for environment variables and static file storage * build: automatically generate random secret key if not provided * build: update docker compose for next url env add channels to requirements for asgi server and save files in local machine for docker environment * build: update nginx conf for backend base url update backend dockerfile to make way for static file uploads * feat: create a default user with given values else default values * chore: update docker python version and other dependency version in docker * build: update local settings file to run it in docker * fix: update script to run in default production setting * fix: env variable changes and env setup shell script added * Added Single Dockerfile to run the Entire plane application * docs build fixes --------- Co-authored-by: Narayana <narayana.vadapalli1996@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
29 lines
664 B
Python
29 lines
664 B
Python
import os, sys
|
|
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("User created")
|
|
|
|
print("Success")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
populate()
|