-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 752 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (25 loc) · 752 Bytes
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
# Makefile
# Docker Compose file location
COMPOSE_FILE = ./docker-compose.yml
COMPOSE_PROD = ./docker-compose.prod.yml
# To start the application for the first time
cold-start:
docker-compose -f $(COMPOSE_FILE) --profile tools up --build -d
# Build the Docker images
build:
docker-compose -f $(COMPOSE_FILE) build --no-cache
# Run the Docker containers
up:
docker-compose -f $(COMPOSE_FILE) up -d
# Access the Docker container
shell:
docker-compose -f $(COMPOSE_FILE) exec server /bin/bash
# Stop the Docker containers
down:
docker-compose -f $(COMPOSE_FILE) down
# Rebuild the Docker images and containers
rebuild: down build up
# Prod env
prod:
docker-compose -f $(COMPOSE_PROD) build --no-cache
docker-compose -f $(COMPOSE_PROD) up -d