Created
January 2, 2021 16:20
-
-
Save yaredc/d9426d2677049e41ee83e3d8fc8f8ce4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SESSION_NAME="project-session" | |
if ! tmux has-session -t $SESSION_NAME 2>/dev/null; then | |
tmux new-session -d -A -s $SESSION_NAME | |
tmux split-window -h | |
tmux send-keys "docker-compose up" C-m | |
tmux select-pane -t 0 | |
tmux split-window -v | |
tmux send-keys "docker-compose exec php bash" | |
fi | |
tmux attach-session -t $SESSION_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment