-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.envrc
51 lines (47 loc) · 1.6 KB
/
.envrc
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
if [ -f "/usr/local/bin/docker" ]; then
if [ -d "/Applications/Docker.app" ]; then
echo "Docker for Mac detected"
export DOCKER_MACHINE_IP=127.0.0.1
else
echo "Docker for VM detected"
if [ "$VAGRANT_DEFAULT_PROVIDER" = "vmware_fusion" ]; then
export MACHINE_DRIVER=vmwarefusion
export FUSION_CPU_COUNT=2
export FUSION_MEMORY_SIZE=4096
export FUSION_DISK_SIZE=40960
else
export MACHINE_DRIVER=virtualbox
export VIRTUALBOX_CPU_COUNT=2
export VIRTUALBOX_MEMORY_SIZE=4096
export VIRTUALBOX_DISK_SIZE=40960
fi
# Create or start the machine if necessary
if [[ ! `docker-machine ls -q | grep default` ]]; then
echo "docker-machine does not exist"
echo "run 'make' to bring up Docker Compose development environment"
export DOCKER_MACHINE_IP=192.168.33.66
elif [[ $(docker-machine status default) = "Running" ]]; then
echo "docker-machine is online"
export DOCKER_MACHINE_IP=$(docker-machine ip default)
else
echo "docker-machine is offline"
echo "run 'make' to bring up Docker Compose development environment"
export DOCKER_MACHINE_IP=192.168.33.66
fi
fi
export COMPOSE_PROJECT_NAME=marketplace
export GIT_SSH_DIR=${HOME}/.ssh
if [[ ! $GITHUB_KEY ]]; then
echo
echo "Environment variable GITHUB_KEY is unspecified. Will use default (~/.ssh/id_rsa)"
echo
export GITHUB_KEY=${HOME}/.ssh/id_rsa
fi
else
echo "No Docker installation detected"
fi
if type nvm > /dev/null 2>&1; then
nvm use v8.9.1
else
echo "nvm not detected. Install it if you need to work on biscotti"
fi