2022-12-01 13:48:10 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2022-12-13 15:17:49 +00:00
|
|
|
python manage.py wait_for_db
|
2022-12-01 13:48:10 +00:00
|
|
|
python manage.py migrate
|
2023-02-21 06:01:43 +00:00
|
|
|
|
2023-11-29 15:03:37 +00:00
|
|
|
# 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
|
2023-11-18 20:18:05 +00:00
|
|
|
|
2023-11-29 15:03:37 +00:00
|
|
|
# Register instance
|
|
|
|
python manage.py register_instance $MACHINE_SIGNATURE
|
|
|
|
# Load the configuration variable
|
|
|
|
python manage.py configure_instance
|
2023-11-18 20:18:05 +00:00
|
|
|
|
2023-11-13 10:27:19 +00:00
|
|
|
# Create the default bucket
|
2023-11-20 07:06:48 +00:00
|
|
|
python manage.py create_bucket
|
2023-02-21 06:01:43 +00:00
|
|
|
|
2023-11-07 12:35:38 +00:00
|
|
|
exec gunicorn -w $GUNICORN_WORKERS -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|