2017-10-22 19:08:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
2019-05-26 00:12:10 +02:00
|
|
|
# If there aren't any keys, generate them first.
|
2019-07-05 19:23:40 +02:00
|
|
|
[ -e "$DIR/.keys/cert.cert" ] || "$DIR/.keys/generate-keys.sh"
|
2019-06-19 15:34:33 +02:00
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
[ -e "$DIR/src/bitBetter/api/.keys" ] || mkdir "$DIR/src/bitBetter/api/.keys"
|
|
|
|
[ -e "$DIR/src/bitBetter/identity/.keys" ] || mkdir "$DIR/src/bitBetter/identity/.keys"
|
2017-10-29 17:57:49 +01:00
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/api/.keys"
|
|
|
|
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/identity/.keys"
|
2017-10-29 17:57:49 +01:00
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
cd "$DIR/src/bitBetter"
|
2017-10-29 17:57:49 +01:00
|
|
|
|
2017-10-22 19:08:50 +02:00
|
|
|
dotnet restore
|
|
|
|
dotnet publish
|
2017-10-29 17:57:49 +01:00
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
cp -r ./bin ./api/
|
|
|
|
cp -r ./bin ./identity/
|
2017-10-29 17:57:49 +01:00
|
|
|
|
2019-07-05 19:23:40 +02:00
|
|
|
docker build -t bitbetter/api ./api # --squash
|
|
|
|
docker build -t bitbetter/identity ./identity # --squash
|