Telemovris 2.0 Rewrite
This commit is contained in:
26
start.sh
Normal file
26
start.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure modules directory exists for MadelineProto
|
||||
mkdir -p data
|
||||
|
||||
# Install dependencies if vendor does not exist
|
||||
if [ ! -d "vendor" ]; then
|
||||
echo "Installing dependencies..."
|
||||
composer require danog/madelineproto
|
||||
composer require predis/predis
|
||||
fi
|
||||
|
||||
# Ensure Piper is executable
|
||||
chmod +x /app/piper/piper/piper
|
||||
|
||||
# Symlink data directory to be accessible from web
|
||||
mkdir -p /app/data
|
||||
ln -snf /app/data /app/src/data
|
||||
|
||||
# Start Web Server in Background
|
||||
echo "Starting Web Server..."
|
||||
php -S 0.0.0.0:8000 -t src > /app/data/web.log 2>&1 &
|
||||
|
||||
# Start Worker
|
||||
echo "Starting Worker..."
|
||||
php src/worker.php
|
||||
Reference in New Issue
Block a user