-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
58 lines (50 loc) · 1.34 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
version: 3
env:
DOPPLER_PROJECT: narb
DOPPLER_CONFIG: nonprod
DOCKER_IMAGE: 4lch4/narb:latest
DOCKER_CONTAINER: narb-test
tasks:
pretty:
desc: Uses the Prettier CLI tool to format the codebase.
aliases: [p, fmt]
cmd: prettier --write .
build:
desc: Builds the project by transpiling the codebase into JavaScript.
aliases: [bd]
cmd: docker build -t {{ .DOCKER_IMAGE }} .
clean:
desc: Deletes the build output directory any installed dependencies and any generated files.
aliases: [c]
cmds:
- docker stop {{ .DOCKER_CONTAINER }}
- docker rm {{ .DOCKER_CONTAINER }}
push:
desc: Push any git changes and tags to the remote repository.
aliases:
- gp
deps:
- build
cmds:
- git push
- git push --tags
secrets:
desc: Syncs the secrets from Doppler to the local environment.
aliases:
- s
cmds:
- doppler secrets download --no-file --format docker -p {{ .DOPPLER_PROJECT }} -c {{ .DOPPLER_CONFIG }} > docker.env
start:
desc: Starts the project.
aliases:
- st
cmds:
- docker run -d --name {{ .DOCKER_CONTAINER }} --env-file="docker.env" {{ .DOCKER_IMAGE }}
restart:
aliases: [r]
desc: Rebuilds and restarts the project.
cmds:
- task build
- task secrets
- task clean
- task start