-
Notifications
You must be signed in to change notification settings - Fork 1
/
BuildDockerImage.cmd
47 lines (37 loc) · 7.84 KB
/
BuildDockerImage.cmd
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
# Build the docker image
docker build -t simpleidserver -f Dockerfile-Authorization .
docker build -t uma -f Dockerfile-Uma .
docker build -t websiteapi -f Dockerfile-WebSiteApi .
docker build -t website -f Dockerfile-WebSite .
docker build -t configuration -f Docker-Configuration .
docker build -t simpleidserver -f Dockerfile-Authorization-Https .
docker build -t marketing -f Dockerfile-Marketing .
# delete all images
docker rm -f $(docker ps -aq)
docker rmi simpleidentityserverdocker_websiteapi
docker rmi simpleidentityserverdocker_simpleidserver
docker rmi simpleidentityserverdocker_configuration
docker rmi simpleidentityserverdocker_website
docker rmi simpleidentityserverdocker_uma
docker rmi simpleidentityserverdocker_manager
# Run postgresql
docker run --name postgresql -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=postgres -d postgres
# Run simpleidserver
docker run --name simpleidserver -e DB_ALIAS=postgresql -e DB_PORT=5432 -p 5443:5443 -p 5000:5000 --link postgresql -it simpleidserver /bin/bash
# Run postgresql - uma
docker run --name postgresql_uma -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=postgres -d postgres
# Run UMA
docker run --name uma -e DB_ALIAS=postgresql -e DB_PORT=5432 --link postgresql_uma:postgresql --link simpleidserver:simpleidserver uma
# Run mongo db
docker run --name mongo -d mongo
# Run application
docker run --name websiteapi --link mongo:mongo -d websiteapi
# Export certificate
openssl x509 -inform der -in LokitCa.cer -out LokitCa.pem
REM run website
docker run -d -e FORCE_SSL=yes -e SSL_CERT="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAv2tMQQBZOd3Kf4jOJbwpTanrM9TUUox6Yi4D+RhCxlLEMHCq\nVcSb3+3xkb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NGL0iinS/yf1c2IkbOtlV26Om0nV9rp3In2\nvAX4Rz8THlc464Gxv4UCFxZQvwDx6HVERKEOmv0Z62WPRdsCAwEAAaN4MHYwDwYD\nVR0TAQH/BAUwAwEB/zBjBgNVHQEEXDBagBAh73KWFFRoD18cF9c1q5CqoTQwMjEM\nMAoGA1UECxMDRGV2MQ8wDQYDVQQKEwZBZHZJQ1QxETAPBgNVBAMTCExva2l0IENB\nghCjHlpNw6ymu0lL/MBsoFw+MAkGBSsOAwIdBQADggEBAAYxRuSBvmPYkVYYOGeI\nH6NItgbHOMoMal3/RCEJ9cisoIw0yQOGKD2m8I8IuuSkV9GnYpFXIjN4ALNXdqPq\n5XjkhxAd73nkOZHMWd5RWYKqxM+gTPP9+MoPJak6Y0Mfmla31rzySG5eEaBlk79O\nic58spT7Et9DESfdx9At3hgJG703dEbaukkN2BDumowfEobzVbl9QacydcmeNPOc\n8FqR13dRjdgDhV3gsLKtJIMdg2l1eyqWw/qtJk+PNTRnr3pi5aueyl3huWEOpCeB\noAaUR4A4KYIxnS+umBo2zVOzyTE2r/leYpF3VomVgyzZx7Sp7qbaIKwLZSRS5AVW\nxvU=\n-----END CERTIFICATE-----\n" --name website simpleidentityserverdocker_website
docker run -d --link website:website -p 443:443 dockercloud/haproxy
REM simpleidserver
docker run --name postgresql -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=postgres -d postgres
docker run --name simpleidserver -e DB_ALIAS=postgresql -e DB_PORT=5432 -e FORCE_SSL=yes -e SSL_CERT="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAv2tMQQBZOd3Kf4jOJbwpTanrM9TUUox6Yi4D+RhCxlLEMHCq\nVcSb3+3xkbMzk45GwckNMZZIqBMRMG3xm670I8fqBy8SIqmkb8K7Fw/XepfDd3PP\nd5ox4SRa92w9ZNgDjZGM/gBVo/rUR0696ebznl+envYu755VMrXBq87ZqrTos+tU\nC2ij0NNXRxBpBW90sNW2OfxZUb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WFFRoD18cF9c1q5CqoTQwMjEM\nMAoGA1UECxMDRGV2MQ8wDQYDVQQKEwZBZHZJQ1QxETAPBgNVBAMTCExva2l0IENB\nghCjHlpNw6ymu0lL/MBsoFw+MAkGBSsOAwIdBQADggEBAAYxRuSBvmPYkVYYOGeI\nH6NItgbHOMoMal3/RCEJ9cisoIw0yQOGKD2m8I8IuuSkV9GnYpFXIjN4ALNXdqPq\n5XjkhxAd73nkOZHMWd5RWYKqxM+gTPP9+MoPJak6Y0Mfmla31rzySG5eEaBlk79O\nic58spT7Et9DESfdx9At3hgJG703dEbaukkN2BDumowfEobzVbl9QacydcmeNPOc\n8FqR13dRjdgDhV3gsLKtJIMdg2l1eyqWw/qtJk+PNTRnr3pi5aueyl3huWEOpCeB\noAaUR4A4KYIxnS+umBo2zVOzyTE2r/leYpF3VomVgyzZx7Sp7qbaIKwLZSRS5AVW\nxvU=\n-----END CERTIFICATE-----\n" --link postgresql -d simpleidentityserverdocker_simpleidserver
docker run -d --link simpleidserver:simpleidserver -p 5443:443 dockercloud/haproxy