0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Add the ability to start development environment in host machine.

This commit is contained in:
Andrey Antukh 2016-11-28 18:29:48 +01:00
parent 46db079334
commit 3accc4b66e
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -9,6 +9,29 @@ function kill_container {
fi
}
function start_local {
tmux -2 new-session -d -s uxbox
tmux new-window -t uxbox:1 -n 'figwheel'
tmux select-window -t uxbox:1
tmux send-keys -t uxbox 'cd frontend' enter
tmux send-keys -t uxbox 'npm run figwheel' enter
tmux new-window -t uxbox:2 -n 'backend'
tmux select-window -t uxbox:2
tmux send-keys -t uxbox 'cd backend' enter
# tmux send-keys -t uxbox 'bash ./scripts/fixtures.sh' enter
# tmux send-keys -t uxbox 'bash ./scripts/run.sh' enter
tmux rename-window -t uxbox:0 'gulp'
tmux select-window -t uxbox:0
tmux send-keys -t uxbox 'cd frontend' enter
tmux send-keys -t uxbox 'if [ ! -e ./node_modules ]; then npm install; fi' enter
tmux send-keys -t uxbox 'npm run watch' enter
tmux -2 attach-session -t uxbox
}
function build_image {
kill_container
sudo docker build --rm=true -t $IMGNAME:$REV docker/
@ -40,6 +63,10 @@ case $1 in
run_image
;;
start)
start_local
;;
init)
initialize
;;