This commit is contained in:
Your Name 2022-05-04 12:14:28 -06:00
parent b065a59af1
commit 787d1a57e4
2 changed files with 8 additions and 8 deletions

View File

@ -30,14 +30,14 @@ cd /opt/pleroma
#Pleroma Configuration #Pleroma Configuration
if [ ! -f "$FILE" ] if [ ! -f "$FILE" ]
then then
MIX_ENV=prod mix pleroma.instance gen su pleroma -s /bin/bash -lc 'MIX_ENV=prod mix pleroma.instance gen'
mv config/generated_config.exs config/prod.secret.exs su pleroma -s /bin/bash -lc 'mv config/generated_config.exs config/prod.secret.exs'
cp -f config/* /config/ su pleroma -s /bin/bash -lc 'cp -f config/* /config/'
sudo -Hu postgres psql -f config/setup_db.psql sudo -Hu postgres psql -f config/setup_db.psql
fi fi
mkdir -p /var/lib/pleroma/uploads su pleroma -s /bin/bash -lc 'mkdir -p /var/lib/pleroma/uploads'
mkdir -p /var/lib/pleroma/static su pleroma -s /bin/bash -lc 'mkdir -p /var/lib/pleroma/static'
#Nginx and SSL #Nginx and SSL
sed -i "s/replaceME/${ENDPOINT}/g" /etc/nginx/conf.d/default.conf sed -i "s/replaceME/${ENDPOINT}/g" /etc/nginx/conf.d/default.conf
@ -45,11 +45,11 @@ openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=CO/L=De
mkdir /var/run/nginx mkdir /var/run/nginx
#Database Migrations #Database Migrations
MIX_ENV=prod mix ecto.migrate su pleroma -s /bin/bash -lc 'MIX_ENV=prod mix ecto.migrate'
touch /configured.txt touch /configured.txt
#Start Pleroma #Start Pleroma
MIX_ENV=prod mix phx.server su pleroma -s /bin/bash -lc 'MIX_ENV=prod mix phx.server'

View File

@ -22,7 +22,7 @@ nginx
if [ ! -f "$FILE" ] if [ ! -f "$FILE" ]
then then
su postgres -s $SHELL -lc "/usr/lib/postgresql/14/bin/pg_ctl start -D /var/lib/postgresql/data" su postgres -s $SHELL -lc "/usr/lib/postgresql/14/bin/pg_ctl start -D /var/lib/postgresql/data"
MIX_ENV=prod mix phx.server su pleroma -s /bin/bash -lc 'MIX_ENV=prod mix phx.server'
fi fi
tail -f /dev/null tail -f /dev/null