-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathTaskfile.yml
61 lines (54 loc) · 1.64 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:
DBT_IMAGE_TAG: local/dbt:latest
USER_NAME:
sh: echo $USER
USER_GID:
sh: id -g $USER
USER_UID:
sh: id -u $USER
WORKING_DIRECTORY:
sh: pwd
tasks:
build_img:
cmds:
- |
docker build --tag {{.DBT_IMAGE_TAG}} \
--build-arg USER_NAME={{.USER_NAME}} \
--build-arg USER_GID={{.USER_GID}} \
--build-arg USER_UID={{.USER_UID}} \
.
start:
cmds:
- |
docker run -it --rm \
--name dbt-myproject \
--env DBT_EXEC_PROFILE=dev \
--volume {{.WORKING_DIRECTORY}}/config:/config \
--volume {{.WORKING_DIRECTORY}}/my_project:/dbt_project \
--volume dbt_packages_volume:/dbt_project/dbt_packages \
--entrypoint /bin/bash \
{{.DBT_IMAGE_TAG}}
build_docs:
cmds:
- |
docker run -it --rm \
--name dbt-docsbuilder \
--env DBT_EXEC_PROFILE=dev \
--volume {{.WORKING_DIRECTORY}}/config:/config \
--volume {{.WORKING_DIRECTORY}}/my_project:/dbt_project \
--volume dbt_packages_volume:/dbt_project/dbt_packages \
{{.DBT_IMAGE_TAG}} \
docs generate
serve_docs:
cmds:
- |
docker run -it --rm \
--name dbt-docs \
--env DBT_EXEC_PROFILE=dev \
--volume {{.WORKING_DIRECTORY}}/config:/config \
--volume {{.WORKING_DIRECTORY}}/my_project:/dbt_project \
--volume dbt_packages_volume:/dbt_project/dbt_packages \
--publish 8123:8123 \
{{.DBT_IMAGE_TAG}} \
docs serve --port 8123