-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (47 loc) · 1.85 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
IMAGES=$(shell docker images -aq)
VOLUMES=$(shell docker volume ls -q)
########################## Installations ##########################
## Install all DroneGuard dependencies [no need if using docker] ##
###################################################################
.SILENT install:
cd ./control-server && npm install; \
cd ../debriefing-service/server && npm install; \
cd ../../debriefing-service/client && npm install; \
cd ../../droneguard-app && npm install --force;
################# Docker #################
## Easy interaction with docker-compose ##
##########################################
# Build DroneGuard project images from internal docker files
build:
docker-compose down \
&& docker-compose build mongo_db dg_server debriefing_app control_server navigation_app
# Start DroneGuard project containers [see specific ports in docker-compose file]
start:
docker-compose up mongo_db dg_server debriefing_app control_server navigation_app \
&& open http://localhost:3000 http://localhost:3003
# Stop DroneGuard project and remove containers
stop:
docker-compose down
# Clear all DroneGuard volumes and images
clear:
docker volume rm $(VOLUMES); docker rmi -f $(IMAGES)
# Run all `make` commands one by one [use carefully]
all:
@read -p "Are you sure? [Y/n] " response; \
if [[ $$response == y || $$response == Y ]]; then \
make stop; make clear; make build; make start; \
fi
############## Scripts ##############
## Videos, Conversions and Uploads ##
#####################################
# Copy videos from RP to local machine
copy:
cd ./scripts && ./scp-videos.sh;
# Convert all .h264 videos to .mp4
convert:
cd ./scripts && ./mp4-conversion.sh;
# Convert videos to MP4 and upload to S3 bucket,
# add bucket URL before running the command
upload:
cd ./scripts && ./record-conversion-and-upload.sh '<ENTER-BUCKET-URL>';