pkmntrade.club/scripts/entrypoint.sh
badbl0cks 0d19f0f060 Update Docker commands in tasks.json and entrypoint.sh for improved service management
- Modified Docker commands in `.vscode/tasks.json` to remove the `-d` flag for running services, allowing for better visibility of logs during development.
- Adjusted `entrypoint.sh` to streamline the startup process by running the development server and npm concurrently, enhancing the development workflow.
2025-04-29 14:01:46 -07:00

23 lines
No EOL
603 B
Bash
Executable file

#!/bin/bash
# Make the script exit when a command fails.
set -e
# Define a cleanup function to handle CTRL-C (SIGINT)
cleanup() {
echo "CTRL-C caught! Shutting down Docker Compose services..."
docker compose -f docker-compose_db_only.yml down
exit 1
}
# Set trap to call cleanup() when SIGINT (Ctrl-C) is received.
trap cleanup SIGINT
# Restart compose services.
echo "Restarting compose services..."
docker compose -f docker-compose_db_only.yml down
docker compose -f docker-compose_db_only.yml up -d
cd theme/static_src
uv run npm run dev &
cd ../../
uv run python manage.py runserver