diff --git a/dokku-setup.sh.sample b/dokku-setup.sh.sample index 87d85b8..13019eb 100644 --- a/dokku-setup.sh.sample +++ b/dokku-setup.sh.sample @@ -11,6 +11,7 @@ set -e APP="firehose" # <-- change to your desired Dokku app name / hostname +DB_NAME="firehose_db" # <-- valid chars: [A-Za-z0-9_] only PHX_HOST="$APP" # <-- change to your full domain, e.g., firehose.example.com # Auto-generate secrets @@ -20,8 +21,8 @@ echo "==> Creating Dokku app: $APP" dokku apps:create "$APP" || echo "App may already exist" echo "==> Creating PostgreSQL database" -dokku postgres:create "${APP}-db" || echo "Database may already exist" -dokku postgres:link "${APP}-db" "$APP" || echo "Database may already be linked" +dokku postgres:create "${DB_NAME}" || echo "Database may already exist" +dokku postgres:link "${DB_NAME}" "$APP" || echo "Database may already be linked" echo "==> Setting environment variables" dokku config:set --no-restart "$APP" \ @@ -29,21 +30,18 @@ dokku config:set --no-restart "$APP" \ PHX_HOST="$PHX_HOST" \ PORT="4000" -# Optional: set custom domain (uncomment and edit) -# dokku domains:set "$APP" "$PHX_HOST" - -# Optional: set up SSL with Let's Encrypt (uncomment) -# dokku letsencrypt:enable "$APP" - echo "" echo "==> Setup complete!" echo "" +echo "DATABASE_URL was set automatically by postgres:link." +echo "" echo "Next steps:" echo " 1. From your local machine, add the git remote:" echo " git remote add dokku dokku@YOUR_SERVER:$APP" echo "" echo " 2. Push to deploy:" echo " git push dokku main" +echo " (migrations run automatically via app.json postdeploy)" echo "" -echo " 3. Run migrations (first deploy):" -echo " dokku run $APP /app/bin/migrate" +echo " 3. Set up SSL (after first deploy):" +echo " dokku letsencrypt:enable $APP"