Skip to content

Commit b3c311b

Browse files
committed
Updated documentation
1 parent e6c78ab commit b3c311b

File tree

5 files changed

+52
-13
lines changed

5 files changed

+52
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 1.0.2 (2008-06-08)
22
* Added showing release notes while upgrading
3-
* Changed create Makefile from Makefile.sample.mk instead of HEADER.mk
3+
* Added Makefile.minimal.mk with basic commands
4+
* Changed create Makefile from Makefile.minimal.mk instead of HEADER.mk
45

56
## 1.0.1 (2018-06-06)
67
* Added Makefile.sample.mk

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,25 @@ make mk-upgrade
2626
## USAGE
2727
![Screen](https://raw.githubusercontent.com/krom/docker-compose-makefile/master/docs/screencast.gif)
2828

29-
**Common (see [samples](https://github.com/krom/docker-compose-makefile/tree/master/samples))**
30-
- **make start** - start all containers
31-
- **make start c=hello** - start container hello
32-
- **make stop** - stop all containers
33-
- **make status** - show list of containers with statuses
34-
- **make clean** - clean all data
29+
**Common** (see [samples](https://github.com/krom/docker-compose-makefile/tree/master/samples))
30+
- `make console` - open container's console
31+
32+
**From Makefile.minimal.mk** (see [samples](https://github.com/krom/docker-compose-makefile/tree/master/samples))
33+
- `make start` - start all containers
34+
- `make start` c=hello** - start container hello
35+
- `make stop` - stop all containers
36+
- `make status` - show list of containers with statuses
37+
- `make clean` - clean all data
3538

3639
**From this library**
37-
- **make help** - show help (see above)
38-
- **make mk-upgrade** - check for updates of mk-lib
39-
- **make mk-version** - show current version of mk-lib
40+
- `make help` - show help (see above)
41+
- `make mk-upgrade` - check for updates of mk-lib
42+
- `make mk-version` - show current version of mk-lib
43+
44+
### VARIABLES
45+
* **ROOT_DIR** - full path to dir with *Makefile*
46+
* **DOCKER_COMPOSE** - docker-compose executable command
47+
* **DOCKER_COMPOSE_FILE** - docker-compose.yml file
4048

4149
## SAMPLES
4250

@@ -69,8 +77,8 @@ You can create _.make.env_ file in directory with Makefile or **current** direct
6977

7078
Available variables
7179

72-
* DOCKER_COMPOSE = {docker-compose executable command}
73-
* DOCKER_COMPOSE_FILE = {custom docker-compose.yml file}
80+
* **DOCKER_COMPOSE** = {docker-compose executable command}
81+
* **DOCKER_COMPOSE_FILE** = {custom docker-compose.yml file}
7482

7583
## TO-DO
7684
- check dependencies

samples/Makefile.minimal.mk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# REQUIRED SECTION
2+
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
3+
include $(ROOT_DIR)/.makefile-lib/common.mk
4+
# END OF REQUIRED SECTION
5+
6+
.PHONY: help dependencies up start stop restart status ps clean
7+
8+
dependencies: check-dependencies ## Check dependencies
9+
10+
up: ## Start all or c=<name> containers in foreground
11+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c)
12+
13+
start: ## Start all or c=<name> containers in background
14+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d $(c)
15+
16+
stop: ## Stop all or c=<name> containers
17+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)
18+
19+
restart: ## Restart all or c=<name> containers
20+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)
21+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c) -d
22+
23+
status: ## Show status of containers
24+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) ps
25+
26+
ps: status ## Alias of status
27+
28+
clean: ## Clean all data
29+
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) down

scripts/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cp README.md $OUT
1111
cp LICENSE $OUT
1212
cp CHANGELOG.md $OUT
1313
cp samples/Makefile $OUT/Makefile.sample.mk
14+
cp samples/Makefile.minimal.mk $OUT/Makefile.minimal.mk
1415

1516
# Writing current version
1617
echo "MK_VERSION := $TRAVIS_TAG" > $OUT/version.mk

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ if [ -f Makefile ]; then
3131
echo "-------------------------------------------------------------------------------
3232
"
3333
else
34-
cp .mk-lib/Makefile.sample.mk Makefile
34+
cp .mk-lib/Makefile.minimal.mk Makefile
3535
echo "Created new Makefile. Feel free to add new commands"
3636
fi;

0 commit comments

Comments
 (0)