-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathJustfile
29 lines (23 loc) · 1.66 KB
/
Justfile
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
set dotenv-load := true
docker-build:
docker build -t ameo/faust-compiler-server:latest .
docker-push:
docker push ameo/faust-compiler-server:latest
docker-run:
docker kill faust-compiler-server || true
docker rm faust-compiler-server || true
docker run -p 4565:4565 -d --name faust-compiler-server \
-e "GOOGLE_APPLICATION_CREDENTIALS=/opt/faust-compiler-server-service-account-creds.json" \
-e "FAUST_WORKLET_TEMPLATE_FILE_NAME=/opt/faustWorkletTemplate.template.js" \
-e "SOUL_WORKLET_TEMPLATE_FILE_NAME=/opt/SoulAWP.template.js" \
-e "AUTH_TOKEN=${AUTH_TOKEN}" \
-v /opt/faust-compiler-server-service-account-creds.json:/opt/faust-compiler-server-service-account-creds.json \
ameo/faust-compiler-server:latest
run:
go build && ./faust-compiler-server
build-and-deploy:
#!/bin/bash
just docker-build
docker save ameo/faust-compiler-server:latest | bzip2 > /tmp/faust-compiler-server.tar.bz2
scp /tmp/faust-compiler-server.tar.bz2 [email protected]:/tmp/faust-compiler-server.tar.bz2
ssh [email protected] -t "cat /tmp/faust-compiler-server.tar.bz2 | bunzip2 | docker load && docker kill web-synth-faust-compiler && docker container rm web-synth-faust-compiler && docker run -d --name web-synth-faust-compiler -p 5401:5401 --restart=always -e SOUL_WORKLET_TEMPLATE_FILE_NAME=/opt/SoulAWP.template.js -e AUTH_TOKEN=jkl23489234lkiJKJjk892384928 -e GOOGLE_APPLICATION_CREDENTIALS=/opt/svc.json -e PORT=5401 -e FAUST_WORKLET_TEMPLATE_FILE_NAME=/opt/faustWorkletTemplate.template.js -v /opt/conf/web-synth/service_account.json:/opt/svc.json ameo/faust-compiler-server:latest && rm /tmp/faust-compiler-server.tar.bz2" && rm /tmp/faust-compiler-server.tar.bz2