diff --git a/README.md b/README.md index 5a3ee3f1e1..daf126b852 100644 --- a/README.md +++ b/README.md @@ -205,17 +205,20 @@ If you are not interested in the development of Phraseanet, you can ignore every ### stack Management -To start and stop the stack, use the `stack_management.sh start|stop|info|check|log` script at the project root. + +To start and stop the stack, use the `stack_management.sh start|stop|info|status|log` script at the project root. this script work only Linux and MacOS. This script wrapping standard oprations for the stack, using standard docker compose cmd and take in account `.env` and `env.local | .env.local` files. + The `stop` operation is the most critical function of the script, as it ensures a clean shutdown of the database container before stopping the entire stack. This script is useful if you are using the database container within the stack. -see more here ![stack Management](doc/infra/compose/stack_management.md) +see more here ![stack](doc/infra/compose/stack.md) + ### Using a env.local method for custom .env values diff --git a/doc/infra/compose/stack_management.md b/doc/infra/compose/stack.md similarity index 100% rename from doc/infra/compose/stack_management.md rename to doc/infra/compose/stack.md diff --git a/stack_management.sh b/stack.sh old mode 100755 new mode 100644 similarity index 97% rename from stack_management.sh rename to stack.sh index 28585cc0d8..8189bc9cea --- a/stack_management.sh +++ b/stack.sh @@ -42,11 +42,6 @@ check_versions() { echo "Docker and Docker Compose versions are compatible." - # Get uptime of the stack - echo "Stack Uptime:" - $DOCKER_COMPSE_CMD ps | awk 'NR>1 {print $4}' - echo - # Get internal IP addresses echo "Internal IP Addresses:" $DOCKER_COMPSE_CMD exec -T db sh -c 'ip addr show eth0 | grep "inet " | awk "{print \$2}" | cut -d/ -f1' @@ -200,17 +195,17 @@ case "$1" in stop) stop_stack ;; - check) + status) check_versions ;; info) display_info ;; - log) + logs) display_logs "$2" ;; *) - echo "Usage: $0 {start|stop|check|info|log [container_name]}" + echo "Usage: $0 {start|stop|status|info|logs [container_name]}" exit 1 esac