-
Notifications
You must be signed in to change notification settings - Fork 1
/
run
executable file
·51 lines (38 loc) · 962 Bytes
/
run
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
#!/bin/bash
set -eo pipefail
function start {
docker compose up --build -d "${@}"
}
function start:local {
docker compose -f docker-compose.yml -f docker-compose.local.yml up --build -d "${@}"
}
function bash:api {
docker exec -it preserve-api /bin/bash
}
function mongo {
docker exec -it preserve-mongodb mongo localhost/preserve
}
function stop {
# This made a docker pull, this is needed elsewhere
docker compose stop
}
function docker:build {
docker build -f base.Dockerfile -t ghcr.io/huridocs/preserve-base:latest .
}
function docker:push {
docker push ghcr.io/huridocs/preserve-base:latest
}
function docker:pull {
docker pull ghcr.io/huridocs/preserve-base:latest
}
function test:unit {
docker exec preserve-api yarn test
}
function test:integration {
docker exec preserve-api yarn test-integration
}
function help {
printf "%s <task> \n\nTasks:\n" "${0}"
compgen -A function | grep -v "^_" | cat -n
}
"${@:-help}"