forked from ijpatricio/traefik-for-forge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile
executable file
·45 lines (34 loc) · 856 Bytes
/
Taskfile
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
#!/usr/bin/env bash
# Inspired on https://github.com/adriancooney/Taskfile
#
# Install an alias, to be able to simply execute `run`
# echo 'alias run=./run' >> ~/.aliases
#
# alias run=./Taskfile
# alias help=./Taskfile help
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | cat -n
}
function default {
help
}
function copyCompose {
cp docker-compose.prod.yml docker-compose.yml
}
function afterFreshInstall {
docker network ls | grep web || docker network create web
cp .env.example .env
}
function auth {
docker run --rm --entrypoint htpasswd httpd:2 -Bbn $1 $2 > traefik.auth
}
function baseDeployScript {
cd /home/forge/traefik
git pull origin $FORGE_SITE_BRANCH
./Taskfile copyCompose
docker-compose up -d --remove-orphans
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-default}"