pleroma/start.sh
Your Name a83b50f190 fux
2022-05-04 12:16:39 -06:00

31 lines
609 B
Bash
Executable File

#!/bin/bash
export SHELL="/bin/bash"
FILE='/configured.txt'
# Start the instance to verify that everything is working as expected
#Set Permissions
chown -R pleroma:pleroma /var/lib/pleroma
chmod -R 777 /saves
#Configure Local Time
cp -f /usr/share/zoneinfo/US/Mountain /etc/localtime
#Start Cron and Postgresql
crond
#Configure and start Nginx
mkdir -p /run/nginx
nginx
#Start Pleroma
if [ ! -f "$FILE" ]
then
su postgres -s $SHELL -lc "/usr/lib/postgresql/14/bin/pg_ctl start -D /var/lib/postgresql/data"
cd /opt/pleroma
su pleroma -s /bin/bash -lc 'MIX_ENV=prod mix phx.server'
fi
tail -f /dev/null