Changed host parameters for webpage
This commit is contained in:
@@ -87,6 +87,10 @@ echo ""
|
||||
echo "Setting up environment file..."
|
||||
if [ ! -f ".env" ]; then
|
||||
cp .env.example .env
|
||||
|
||||
# Update PORT in .env file
|
||||
sed -i "s/^PORT=.*/PORT=$APP_PORT/" .env
|
||||
|
||||
echo ""
|
||||
echo "IMPORTANT: You need to configure /opt/faction-war/app/.env with your secrets!"
|
||||
echo ""
|
||||
@@ -94,6 +98,8 @@ if [ ! -f ".env" ]; then
|
||||
echo " - AUTH_PASSWORD: openssl rand -base64 32"
|
||||
echo " - JWT_SECRET: openssl rand -hex 64"
|
||||
echo ""
|
||||
echo "Application port has been set to: $APP_PORT"
|
||||
echo ""
|
||||
echo "You can either:"
|
||||
echo " 1. Edit the .env file now"
|
||||
echo " 2. Skip and edit it later before starting the application"
|
||||
@@ -112,8 +118,8 @@ chmod 600 .env
|
||||
|
||||
echo ""
|
||||
echo "Setting up systemd service..."
|
||||
# Update the service file with the configured port
|
||||
sed "s|ExecStart=.*|ExecStart=/opt/faction-war/app/venv/bin/python main.py --port $APP_PORT|g" faction-war.service > /etc/systemd/system/faction-war.service
|
||||
# Copy the service file
|
||||
cp faction-war.service /etc/systemd/system/faction-war.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable faction-war
|
||||
systemctl start faction-war
|
||||
@@ -159,6 +165,7 @@ echo ""
|
||||
echo "Important next steps:"
|
||||
echo "1. Configure /opt/faction-war/app/.env with your secrets (if not done already)"
|
||||
echo " - Edit with: sudo -u factionwar nano /opt/faction-war/app/.env"
|
||||
echo " - Change PORT or HOST in .env if needed"
|
||||
echo " - Then restart: sudo systemctl restart faction-war"
|
||||
echo "2. Access the application:"
|
||||
echo " - Local: http://localhost:$APP_PORT"
|
||||
|
||||
Reference in New Issue
Block a user