-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
46 lines (35 loc) · 975 Bytes
/
Makefile
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
SHELL := /bin/bash
start: setup_env setup_nvm_pgdata up start_server
up:
cd apps/api
docker-compose up -d shortdb gql yaus-broker shortnr-cache shortnr-redis-commander
echo "the script will sleep for 60s to let the services start"
sleep 60s
echo "The docker containers are up"
setup_nvm_pgdata:
touch somefile
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# Load NVM
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"
source $(HOME)/.nvm/nvm.sh ;\
nvm install 16
source $(HOME)/.nvm/nvm.sh ;\
nvm use 16
sudo apt-get install unzip
sudo rm -rf pgdata
unzip pgdata.zip
setup_env:
sudo cp sample.env .env
start_server:
echo "Starting the YAUS server"
yarn install
npx nx serve api
stop:
cd apps/api
docker-compose stop
down:
cd apps/api
docker-compose down
reset: down start