-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
48 lines (38 loc) · 1.46 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
# Enrique Catalá:
# Web: https://www.clouddataninjas.com
# Linkedin: https://www.linkedin.com/in/enriquecatala/
# Support: https://github.com/sponsors/enriquecatala
.PHONY: create-local-directories download-databases download-all-databases prerequisites build start all clean
# Step 1: Create local directories
create-local-directories:
@echo "Creating local directories..."
./prerequisites.create_local_directories.sh
# Step 2: Download databases with INCLUDE_ALL_DATABASES set to 1
download-databases:
@echo "Downloading databases to './Backups' folder..."
INCLUDE_ALL_DATABASES=0 ./prerequisites.download_databases.sh
download-all-databases:
@echo "Downloading ALL databases to './Backups' folder..."
INCLUDE_ALL_DATABASES=1 ./prerequisites.download_databases.sh
# Prerequisites: Executes the creation of the directory and the download of the databases
prerequisites: create-local-directories download-all-databases
# Step 3: Build the Docker container
build:
@echo "Building Docker container..."
docker compose build
# Step 4: Start the Docker container
start:
@echo "Starting Docker container..."
docker compose up
# Default make target to run all steps
all:
@echo "Setting up the environment..."
$(MAKE) prerequisites
$(MAKE) build
$(MAKE) start
clean:
@echo "Cleaning up everything, including databases..."
docker compose down
sudo rm -rf ./Backups/AdventureWorks*
sudo rm -rf ./Backups/WideWorldImporters*
sudo rm -rf ./local_mountpoint/