-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstallauthorization-swarm-simple.sh
More file actions
51 lines (44 loc) · 1.45 KB
/
installauthorization-swarm-simple.sh
File metadata and controls
51 lines (44 loc) · 1.45 KB
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
#!/bin/bash
set -e
authority=$1
authcert=$2
authkey=$3
couchproxy=$4
appInsightsInstrumentationKey=$5
authorizationversion=$6
echo "creating authnet network"
docker network create --driver overlay authnet
docker network create --driver overlay idnet
echo "creating secrets"
docker secret create auth.cert $authcert
docker secret create auth.key $authkey
docker pull healthcatalyst/fabric.authorization:$authorizationversion
docker pull healthcatalyst/fabric.docker.nginx
echo "creating authorization service"
docker service create --name authorization \
--env IdentityServerConfidentialClientSettings__Authority=$authority \
--env CouchDbSettings__Server=$couchproxy \
--env FABRIC_IDENTITY_URL=$authority \
--env FABRIC_AUTH_URL=https://authorizationproxy \
--env ApplicationInsights__Enabled=true \
--env ApplicationInsights__InstrumentationKey=$appInsightsInstrumentationKey \
--secret="CouchDbSettings__Username" \
--secret="CouchDbSettings__Password" \
--replicas 1 \
--network authnet \
--network idnet \
--network dbnet \
--detach=false \
healthcatalyst/fabric.authorization:$authorizationversion
echo "creating authorization nginx proxy"
docker service create --name authorizationproxy \
--env HOST=authorization \
--env REMOTEPORT=5004 \
--env CERTIFICATE="auth.cert" \
--env CERTIFICATE_KEY="auth.key" \
--secret="auth.cert" \
--secret="auth.key" \
-p 80:80 -p 443:443 \
--network authnet \
--detach=false \
healthcatalyst/fabric.docker.nginx