-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
69 lines (58 loc) · 1.61 KB
/
Taskfile.yml
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
67
68
69
version: '3'
env:
NAME: primerdriver
SHORT_SHA:
sh: git rev-parse --short HEAD
tasks:
default:
cmd:
task: up
up:
desc: Build and start containers
cmd: docker compose --project-name {{.NAME}} up --detach --build --remove-orphans {{.CLI_ARGS}}
stop:
desc: Stop containers
cmd: docker compose --project-name {{.NAME}} stop {{.CLI_ARGS}}
logs:
desc: Follow Docker logs
interactive: true
cmd: docker compose --project-name {{.NAME}} logs --follow {{.CLI_ARGS}}
restart:
desc: Restart containers
cmd: docker compose --project-name {{.NAME}} restart {{.CLI_ARGS}}
down:
desc: Stop and remove containers
cmd: docker compose --project-name {{.NAME}} down --remove-orphans
clean:
desc: Nuke everything
cmd: docker compose --project-name {{.NAME}} down --volumes --remove-orphans
build-web:
desc: Build web app image
cmd: >
docker build
-t kvdomingo/primerdriver:{{.SHORT_SHA}}
-t kvdomingo/primerdriver:latest
--build-arg SHORT_SHA={{.SHORT_SHA}}
-f web.Dockerfile .
build-cli:
desc: Build CLI
cmds:
- >
docker build
-t kvdomingo/primerdriver-cli:{{.SHORT_SHA}}
-t kvdomingo/primerdriver-cli:latest
-f cli.Dockerfile .
- >
docker run
-t --rm
-u $(id -u):$(id -g)
-v "$(pwd)":/build
--workdir /build
kvdomingo/primerdriver-cli:latest
build-docs:
desc: Build docs
cmd: >
docker build
-t kvdomingo/primerdriver-docs:{{.SHORT_SHA}}
-t kvdomingo/primerdriver-docs:latest
-f docs.Dockerfile .