1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 23:04:22 +00:00
config-fish/functions/redocker.fish

22 lines
593 B
Fish
Raw Normal View History

2024-08-21 09:45:18 +00:00
which docker --skip-functions >/dev/null 2>/dev/null
if [ $status -eq 0 ]
function redocker
set project (docker compose config --format json | jq --raw-output .name)
2023-11-13 03:44:50 +00:00
2024-08-21 09:45:18 +00:00
log-d "Pulling images used by " "$project" "..."
command docker compose pull
2023-11-13 03:44:50 +00:00
2024-08-21 09:45:18 +00:00
log-d "Building images using by " "$project" "..."
command docker compose build
2023-11-13 03:44:50 +00:00
2024-08-21 09:45:18 +00:00
echo_progress "Taking down " "$project" "..."
command docker compose down
2023-11-13 03:44:50 +00:00
2024-08-21 09:45:18 +00:00
echo_progress "Bringing up " "$project" "..."
command docker compose up -d
echo_progress "Opening logs of " "$project" "..."
command docker compose logs -f
end
2023-11-13 03:44:50 +00:00
end