-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelop
More file actions
executable file
·32 lines (26 loc) · 860 Bytes
/
develop
File metadata and controls
executable file
·32 lines (26 loc) · 860 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
#!/usr/bin/env bash
# Set script scope environment variables for dev or CI.
export CFN_TEMPLATE=${CFN_TEMPLATE:-cloudformation}
# Pass arguments to docker-compose, or default to docker-compose ps.
if [[ $# -gt 0 ]]; then
case "$1" in
# Run the Cloudformation generate command inside a new container
cfn|cloudformation )
docker-compose run --rm troposphere > aws/${CFN_TEMPLATE}.json
cat aws/${CFN_TEMPLATE}.json
;;
# Run a node command inside a new container
npm )
shift 1
docker-compose run --rm ${TTY} \
-w /var/www/html \
-e WWWUID=${WWWUID} \
admin \
npm "$@"
;;
# Run a docker-compose command
* ) docker-compose "$@"; ;;
esac
else
docker-compose ps
fi