-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (54 loc) · 2.15 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ==============================
# DEVELOPMENT
# ==============================
# `make dev`
# Start the development containers. If no containers exist, then this command will create new containers.
dev:
docker-compose -f docker-compose.dev.yml up
# The `-f` flag specifies the filename that should be used in the docker-compose command.
# `make dev-rebuild`
# If you want to rebuild the images without using the cache, then run this command first,
# then run `make dev` to start the newly built development containers.
dev-rebuild:
docker-compose -f docker-compose.dev.yml build --no-cache
# `make dev-daemon`
dev-daemon:
docker-compose -f docker-compose.dev.yml up -d
# The `-d` flag will run the app in daemon mode (i.e., in the background).
# `make dev-down`
# This will stop and delete any running containers. It deletes containers and networks, but not volumes and images.
dev-down:
docker-compose -f docker-compose.dev.yml down
# ==============================
# TEST
# ==============================
# `make test`
test:
docker-compose -f docker-compose.test.yml up
# ==============================
# STAGING
# ==============================
# `make staging`
staging:
docker-compose -f docker-compose.staging.yml up
# ==============================
# PRODUCTION
# ==============================
# `make prod`
# Start the production containers in daemon mode. If no containers exist, then this command will create new containers.
prod:
docker-compose -f docker-compose.prod.yml up
# The `-f` flag specifies the filename that should be used in the docker-compose command.
# `make prod-rebuild`
# If you want to rebuild the images without using the cache, then run this command first,
# then run `make prod` to start the newly built production containers.
prod-rebuild:
docker-compose -f docker-compose.prod.yml build --no-cache
# `make prod-daemon`
prod-daemon:
docker-compose -f docker-compose.prod.yml up -d
# The `-d` flag runs the app in daemon mode (i.e., in the background).
# `make prod-down`
# This will stop and delete any running containers. It deletes containers and networks, but not volumes and images.
prod-down:
docker-compose -f docker-compose.prod.yml down