-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (26 loc) · 783 Bytes
/
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
# Define variables
APP_NAME = image-placeholder
DOCKER_COMPOSE_FILE = docker-compose.yaml
# Build the Docker image
build:
docker-compose -f $(DOCKER_COMPOSE_FILE) build
# Run the application using Docker Compose
up:
docker-compose -f $(DOCKER_COMPOSE_FILE) up
# Run the application in detached mode
up-detached:
docker-compose -f $(DOCKER_COMPOSE_FILE) up -d
# Stop and remove the containers
down:
docker-compose -f $(DOCKER_COMPOSE_FILE) down
# Remove the Docker image
clean:
docker-compose -f $(DOCKER_COMPOSE_FILE) down --rmi all
# Restart the application
restart: down up
# Tail the logs of the running containers
logs:
docker-compose -f $(DOCKER_COMPOSE_FILE) logs -f
# Show the status of the running containers
status:
docker-compose -f $(DOCKER_COMPOSE_FILE) ps