-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·46 lines (40 loc) · 1.1 KB
/
start.sh
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
#!/bin/bash
# The current Version of this file can be found HERE:
# https://github.com/pluswerk/php-dev/blob/master/start.sh
[ -f .env ] && . .env
CONTEXT=${CONTEXT:-Development}
USER=${APPLICATION_UID:-1000}:${APPLICATION_GID:-1000}
function startFunction {
key="$1"
case ${key} in
start)
startFunction pull && \
startFunction build && \
startFunction up && \
startFunction login
return
;;
up)
docker-compose --project-directory . -f docker-compose.yml up -d --remove-orphans
return
;;
down)
docker-compose --project-directory . -f docker-compose.yml down --remove-orphans
return
;;
login)
docker-compose --project-directory . -f docker-compose.yml exec -u $USER web bash
return
;;
login:node)
docker-compose --project-directory . -f docker-compose.yml exec -u $USER node bash
return
;;
*)
docker-compose --project-directory . -f docker-compose.yml "${@:1}"
return
;;
esac
}
startFunction "${@:1}"
exit $?