-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathTaskfile
More file actions
executable file
·45 lines (34 loc) · 748 Bytes
/
Taskfile
File metadata and controls
executable file
·45 lines (34 loc) · 748 Bytes
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
#!/bin/bash
set -euo pipefail
dirname=${PWD##*/} # Get the current dir name, without full path
dirname=${dirname:-/} # to correct for the case where PWD is / (root)
dirname=`echo $dirname | tr '[:upper:]' '[:lower:]'` # Convert the dirname to lowercase.
project=${dirname}
appContainer="php81"
function build {
docker compose build
}
function start {
docker compose up -d
}
function stop {
docker compose down
}
function restart {
stop
start
}
function shell {
start
docker compose exec -u $(id -u):$(id -g) ${appContainer} bash
}
function default {
start
}
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | cat -n
}
TIMEFORMAT="Task completed in %3lR"
time ${@:-default}