-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.4 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
.PHONY: env download build build-dev run logs run-dev logs-dev down
--check-env:
# Check if .env file exists. If not, refuse to run.
@if [ ! -f ./.env ]; then \
echo "Please run 'make env' first"; \
exit 1; \
fi
env:
cp ./.env.example ./.env
@echo "Please edit .env file"
download:
@echo "Ensuring correct permission on the download script..."
chmod +x ./scripts/download-ml-models.sh
@echo "Downloading ML models using the download script..."
./scripts/download-ml-models.sh
build: --check-env
@echo "Building the Prd version..."
docker-compose -f docker-compose.yml build
build-dev: --check-env
@echo "Building the Dev version..."
docker-compose -f docker-compose.dev.yml build
run: --check-env
# @echo "Ensuring that the Dev version is down..."
# docker-compose -f docker-compose.dev.yml down
@echo "Starting the Prd version..."
docker-compose -f docker-compose.yml up --build -d
logs:
docker-compose -f docker-compose.yml logs -f
run-dev: --check-env
# @echo "Ensuring that the Prd version is down..."
# docker-compose -f docker-compose.yml down
@echo "Starting the Dev version..."
docker-compose -f docker-compose.dev.yml up --build -d
logs-dev:
docker-compose -f docker-compose.dev.yml logs -f
##################
down: --check-env
@echo "Stopping the Prd version..."
docker-compose -f docker-compose.yml down
@echo "Stopping the Dev version..."
docker-compose -f docker-compose.dev.yml down