Spaces:
Runtime error
Runtime error
File size: 483 Bytes
98986c4 2d1d96b 3f68a38 825f2c6 f36b963 98986c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os
from subprocess import Popen
os.environ["ALLOWED_HOSTS"] = "pplonski-deploy-mercury.hf.space"
os.environ["DJANGO_SUPERUSER_PASSWORD"] = "test"
os.environ["DJANGO_SUPERUSER_USERNAME"] = "test"
os.environ["DJANGO_SUPERUSER_EMAIL"] = "test@example.com"
command = ["mercury", "createsuperuser", "--noinput"]
worker = Popen(command)
worker.wait()
command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}", "--verbose"]
worker = Popen(command)
worker.wait() |