feat: ability to create a project #9

Merged
matous-volf merged 50 commits from feat/project-create into main 2024-08-18 21:36:06 +00:00
Showing only changes of commit 5ca35cc5f1 - Show all commits

View File

@ -1,3 +1,5 @@
#!/bin/bash
diesel migration run diesel migration run
supervisord -c /etc/supervisor/conf.d/supervisord.conf supervisord -c /etc/supervisor/conf.d/supervisord.conf
coderabbitai[bot] commented 2024-08-18 21:32:48 +00:00 (Migrated from github.com)
Review

Enhance error handling and logging.

Consider adding error handling to ensure the script exits on failure, and include logging to track the execution flow. This will improve the maintainability and debuggability of the script.

set -euo pipefail

# Log the start of the script
echo "Starting entrypoint script..."

# Run Diesel migrations
if diesel migration run; then
  echo "Migrations applied successfully."
else
  echo "Failed to apply migrations." >&2
  exit 1
fi

# Start supervisord
if supervisord -c /etc/supervisor/conf.d/supervisord.conf; then
  echo "Supervisord started successfully."
else
  echo "Failed to start supervisord." >&2
  exit 1
fi
**Enhance error handling and logging.** Consider adding error handling to ensure the script exits on failure, and include logging to track the execution flow. This will improve the maintainability and debuggability of the script. ```bash set -euo pipefail # Log the start of the script echo "Starting entrypoint script..." # Run Diesel migrations if diesel migration run; then echo "Migrations applied successfully." else echo "Failed to apply migrations." >&2 exit 1 fi # Start supervisord if supervisord -c /etc/supervisor/conf.d/supervisord.conf; then echo "Supervisord started successfully." else echo "Failed to start supervisord." >&2 exit 1 fi ``` <!-- This is an auto-generated comment by CodeRabbit -->