-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
123 lines (82 loc) · 3.29 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
SHELL=/bin/bash
SDK_INIT=source ~/.sdkman/bin/sdkman-init.sh
NVM_INIT=source ~/.nvm/nvm.sh
JAVA_VERSION=11.0.17-amzn
EXPORT_ENV=export PLAY_SECRET=$(PLAY_SECRET)
docker-build: sbt-build
$(EXPORT_ENV); cd docker; sudo -E docker-compose up --no-start --build
apt-update:
sudo apt update
curl-install: apt-update
sudo apt-get install -y curl
docker-install: apt-update
sudo apt-get install -y docker docker-compose
psql-install: apt-update
sudo apt-get install -y postgresql-client
doctl-install:
sudo snap install doctl; sudo snap connect doctl:kube-config
kubeseal-install:
sudo snap install sealed-secrets-kubeseal-nsg
kubectl-install:
sudo snap install kubectl --classic
k8-install: doctl-install kubeseal-install kubectl-install
libsodium-install:
sudo apt-get install -y libsodium-dev
geckodriver-install:
cd /tmp; \
curl -Ls --output - https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz | tar zxv; \
sudo cp geckodriver /usr/local/bin; \
rm geckodriver
sdkman-install:
curl -s "https://get.sdkman.io" | bash
jdk-install:
$(SDK_INIT); sdk install java $(JAVA_VERSION); sdk default java $(JAVA_VERSION)
sbt-install:
$(SDK_INIT); sdk install sbt
nvm-install:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
ngrok-install:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list; sudo apt update; sudo apt install ngrok
pre-commit-install:
sudo apt-get install -y pre-commit
install-dev: curl-install sdkman-install jdk-install sbt-install docker-install nvm-install libsodium-install geckodriver-install ngrok-install k8-install psql-install pre-commit-install
echo 'Launch a new shell to continue... '; read
staging-config:
bin/staging-config.sh
sbt-run: staging-config docker-db-start
$(SDK_INIT); sbt run -Dlogger.resource=logback-development.xml
sbt-test:
$(SDK_INIT); sbt test
sbt-unit-tests:
$(SDK_INIT); sbt "testOnly unittests.*"
sbt-functional-tests:
$(SDK_INIT); sbt "testOnly functionaltests.*"
sbt-build:
$(SDK_INIT); sbt dist
sbt-scalafix-check:
$(SDK_INIT); sbt "scalafixAll --check"
sbt-scalafix:
$(SDK_INIT); sbt "scalafixAll"
sbt-scalafmt-check-all:
$(SDK_INIT); sbt "scalafmtCheckAll"
docker-push: docker-build docker-play-server-push docker-ci-push docker-postgres-backup-push
docker-play-server-push:
sudo docker push registry.gitlab.com/mesonomics/meso-alert/play-server
docker-ci-push:
sudo docker push registry.gitlab.com/mesonomics/meso-alert/ci
docker-postgres-backup-push:
sudo docker push registry.gitlab.com/mesonomics/meso-alert/postgres-backup
docker-server-start: docker-build
$(EXPORT_ENV); cd docker; sudo -E docker-compose up
dir-postgres-create:
sudo mkdir -p /data/1/meso-alert-db
docker-db-start: dir-postgres-create
$(EXPORT_ENV); cd docker; sudo -E docker-compose up -d postgres-db; sleep 2
db-init: docker-db-start
psql --user meso-alert --db meso-alert --port ${POSTGRES_PORT} --host ${POSTGRES_HOST} -f sql/schema.sql
nodejs-install:
$(NVM_INIT); nvm install 16.15.0
client-install: nodejs-install
$(NVM_INIT); cd nodejs; npm install
client-start: client-install
$(NVM_INIT); cd nodejs; node ws-client.js