generated from ministryofjustice/opg-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (17 loc) · 834 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: all test build start clean
all: test start clean
test:
@echo "Running tests in the service-app-test container..."
@docker-compose build service-app-test || { echo "Failed to build the service-app-test image"; exit 1; }
@docker-compose run --rm service-app-test || { echo "Tests failed"; exit 1; }
@docker-compose down --remove-orphans --volumes service-app-test
build:
@echo "Building the application..."
@docker-compose build || { echo "Failed to build the application image"; exit 1; }
start:
@${MAKE} build
@echo "Running the application using Docker Compose..."
@docker-compose up -d || { echo "Failed to start Docker Compose"; exit 1; }
clean:
@echo "Stopping and cleaning up Docker Compose resources..."
@docker-compose down --remove-orphans --volumes || { echo "Failed to clean up resources"; exit 1; }