forked from github/plane
e755ce3272
* dev: remove license engine communication * dev: remove license engine base url * dev: update instance configuration function * chore: removed the print statement * chore: changed config variables * chore: cleanup * chore: added SKIP_ENV_VAR * chore: changed the EMAIL_FROM * dev: patch endpoint for workspace * dev: custom port for takeoff script * chore: changed my sequence * fix: update operaton for member invitations in workspace * clean-up: remove logs --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: gurusainath <gurusainath007@gmail.com>
31 lines
912 B
Bash
Executable File
31 lines
912 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
python manage.py wait_for_db
|
|
python manage.py migrate
|
|
|
|
# Create the default bucket
|
|
#!/bin/bash
|
|
|
|
# Collect system information
|
|
HOSTNAME=$(hostname)
|
|
MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1)
|
|
CPU_INFO=$(cat /proc/cpuinfo)
|
|
MEMORY_INFO=$(free -h)
|
|
DISK_INFO=$(df -h)
|
|
|
|
# Concatenate information and compute SHA-256 hash
|
|
SIGNATURE=$(echo "$HOSTNAME$MAC_ADDRESS$CPU_INFO$MEMORY_INFO$DISK_INFO" | sha256sum | awk '{print $1}')
|
|
|
|
# Export the variables
|
|
export MACHINE_SIGNATURE=$SIGNATURE
|
|
|
|
# Register instance
|
|
python manage.py register_instance $MACHINE_SIGNATURE
|
|
# Load the configuration variable
|
|
python manage.py configure_instance
|
|
|
|
# Create the default bucket
|
|
python manage.py create_bucket
|
|
|
|
exec gunicorn -w $GUNICORN_WORKERS -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:${PORT:-8000} --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|