Use readlink -f to resolve the script's real path so that reload.sh can be invoked through a symlink from any directory.
9 lines
187 B
Bash
Executable File
9 lines
187 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
source="$(readlink -f -- "${BASH_SOURCE[0]}")"
|
|
cd -- "$(dirname -- "$source")"
|
|
|
|
exec docker compose exec -T nginx sh -s <./.reload-in-container.sh
|