From 3b484245dfeab4ea50316f5f18cd671ba8c4fd3a Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 16 Jun 2025 10:45:48 -0500 Subject: [PATCH] add start script --- start_server.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 start_server.sh diff --git a/start_server.sh b/start_server.sh new file mode 100644 index 0000000..3ba30f3 --- /dev/null +++ b/start_server.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -e + +echo "=== APRS Server Startup Debug Script ===" +echo "Time: $(date)" +echo "Working directory: $(pwd)" +echo "User: $(whoami)" +echo "UID: $(id -u)" + +echo "" +echo "=== Environment Variables ===" +echo "PORT: ${PORT:-'not set'}" +echo "PHX_SERVER: ${PHX_SERVER:-'not set'}" +echo "PHX_HOST: ${PHX_HOST:-'not set'}" +echo "MIX_ENV: ${MIX_ENV:-'not set'}" +echo "DATABASE_URL: ${DATABASE_URL:+***set***}" +echo "SECRET_KEY_BASE: ${SECRET_KEY_BASE:+***set***}" + +echo "" +echo "=== File System Check ===" +echo "App directory contents:" +ls -la /app/ +echo "" +echo "Bin directory contents:" +ls -la /app/bin/ +echo "" +echo "Server script permissions:" +ls -la /app/bin/server + +echo "" +echo "=== Network Configuration ===" +echo "Available network interfaces:" +ip addr show 2>/dev/null || ifconfig 2>/dev/null || echo "Network tools not available" + +echo "" +echo "=== Starting Phoenix Server ===" +echo "Executing: /app/bin/server" +echo "Expected to bind to port: ${PORT:-4000}" +echo "" + +# Start the server +exec /app/bin/server