-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
21 lines (17 loc) · 590 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
NODE_ENV=$1
echo "The NODE_ENV is: $NODE_ENV"
echo "removing auth/lib..."
rm -rf auth/lib
echo "removing auth/node_modules..."
rm -rf auth/node_modules
echo "removing server/.env"
rm server/.env
if [ "$NODE_ENV" = "dev" ]; then
cp .env.dev server/.env
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
#* the above `docker-compose` command will read from two `.yml` files to gather the info needed to start this container
else
cp .env.prod server/.env
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build
fi