-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 923 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
35
36
37
38
39
40
41
42
43
.PHONY: start stop restart up-server up-web ssh logs
# Start all services
start: | up-web up-server
# Kill all services
stop:
@docker-compose kill
# Restart all services
restart: | stop start
# Start the server container
up-server:
@docker-compose up -d server
# Start the web container
up-web:
@docker-compose up -d web
# Clears the build cache and rebuilds the container
build-server-fresh:
@docker-compose build --no-cache server
# Clears the build cache and rebuilds the container
build-web-fresh:
@docker-compose build --no-cache web
# SSH into a container
# EXAMPLE: make ssh tar=web
ssh:
@docker exec -it deuces-$${tar} /bin/bash
# Live log viewer
# EXAMPLE: make logs tar=server
# make logs tar=web tail=10
tail = -1 # Default to showing all lines
logs:
@docker logs -f deuces-$${tar} --tail ${tail}
# Same as "logs" but with timestamps
logst:
@docker logs -t -f deuces-$${tar} --tail ${tail}