-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_all_components.sh
executable file
·37 lines (28 loc) · 1.1 KB
/
start_all_components.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -evx
# tmux kill-session -t spread
# start dockerized components
tmux new-session -s spread -d 'source env/dev; bash -i';
tmux send-keys -t "spread:0" 'docker-compose -f deployments/dev/docker-compose.yml up' Enter;
# start worker thread
tmux new-window -t "spread:1";
tmux send-keys -t "spread:1" 'source env/dev' Enter;
tmux send-keys -t "spread:1" 'clj -A:run-worker' Enter;
# start API
# NOTE: api needs three more ENV vars exported for the login to work properly
# PRIVATE_KEY_DEV, GOOGLE_CLIENT_SECRET and SENDGRID_API_KEY
# which are NOT under source version control for security reasons
# ask for them before running the software locally
tmux new-window -t "spread:2";
tmux send-keys -t "spread:2" 'source env/dev' Enter;
tmux send-keys -t "spread:2" 'clj -A:run-api' Enter;
# start frontend
tmux new-window -t "spread:3";
tmux send-keys -t "spread:3" 'source env/dev' Enter;
tmux send-keys -t "spread:3" 'yarn watch' Enter;
# start viewer
tmux new-window -t "spread:4";
tmux send-keys -t "spread:4" 'source env/dev' Enter;
tmux send-keys -t "spread:4" 'yarn watch:viewer' Enter;
tmux a;
exit $?