mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
512ad83c08
* dev: wait for migrations script for beat, worker, takeoff * dev: update docker compose and migrator commands * dev: migrator commands for self hosted setup * dev: add recursive flag for chown
33 lines
833 B
Bash
Executable File
33 lines
833 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
python manage.py wait_for_db
|
|
# Wait for migrations
|
|
python manage.py wait_for_migrations
|
|
|
|
# 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
|
|
|
|
python manage.py runserver 0.0.0.0:8000 --settings=plane.settings.local
|
|
|