-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
61 lines (50 loc) · 1.19 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
version: '3'
vars:
LOCAL_SERVICES: "app"
COMPOSE_FILE: "COMPOSE_FILE=docker-compose.yml"
BUILD_CMD: "docker-compose build --no-cache"
PULL_CMD: "docker-compose pull"
RUN_CMD: "docker-compose up -d {{.LOCAL_SERVICES}}"
RUN_APP_CMD: "docker-compose up -d app"
STOP_CMD: "docker-compose down -v || true"
BASH_CMD: "docker exec -it app-$PROJECT_NAME bash"
LOGS_CMD: "docker-compose logs -f --tail=500"
CONTROL_CENTER_CMD: "docker-compose up -d control-center"
GATEWAY_NETWORK_CMD: "docker network create go-graphql-network || true"
tasks:
default:
cmds:
- task: run
run:
desc: Execute local project
cmds:
- task: build
- '{{.GATEWAY_NETWORK_CMD}}'
- '{{.RUN_CMD}}'
build:
desc: Build container
cmds:
- '{{.BUILD_CMD}}'
install:
desc: Install dependencies
cmds:
- task: stop
- task: build
- '{{.INSTALL_DEPENDENCIES_CMD}}'
stop:
desc: Stop env
cmds:
- '{{.STOP_CMD}}'
restart:
desc: Recreate env
cmds:
- task: stop
- task: run
app:
desc: Enter app bash
cmds:
- '{{.BASH_CMD}}'
logs:
desc: Docker logs
cmds:
- '{{.LOGS_CMD}}'