Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. echo
  4. echo
  5. echo "Starting up services fxa.localhorst.home"
  6. echo
  7. docker run --detach --rm --name httpdb \
  8. --env "HOST=0.0.0.0" \
  9. --env "MYSQL_PASSWORD=xxxxxxxx" \
  10. --env "MYSQL_SLAVE_PASSWORD=xxxxxxxx" \
  11. --env "MYSQL_HOST=172.17.0.1" \
  12. --env "MYSQL_SLAVE_HOST=172.17.0.1" \
  13. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  14. --add-host="fxa.localhorst.home:192.168.0.2" \
  15. fxa-auth-db-mysql:latest
  16.  
  17. docker run --detach --rm --name verifier \
  18. --env "IP_ADDRESS=0.0.0.0" \
  19. --env "PORT=5050" \
  20. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  21. --add-host="fxa.localhorst.home:192.168.0.2" \
  22. fxa-browserid-verifier:latest
  23.  
  24. docker run --detach --rm --name profile \
  25. --publish 1112:1112 \
  26. --publish 1113:1113 \
  27. --env "PUBLIC_URL=https://fxa.localhorst.home:1111" \
  28. --env "AUTH_SERVER_URL=https://fxa.localhorst.home:9000/v1" \
  29. --env "OAUTH_SERVER_URL=https://fxa.localhorst.home:9010/v1" \
  30. --env "DB=mysql" \
  31. --env "MYSQL_HOST=172.17.0.1" \
  32. --env "MYSQL_PASSWORD=xxxxxxxx" \
  33. --env "REDIS_HOST=172.17.0.1" \
  34. --env "IMG=local" \
  35. --env "HOST=0.0.0.0" \
  36. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  37. --add-host="fxa.localhorst.home:192.168.0.2" \
  38. fxa-profile-server:latest
  39.  
  40. docker run --detach --rm --name content \
  41. --env "PUBLIC_URL=https://fxa.localhorst.home:3030" \
  42. --env "FXA_OAUTH_URL=https://fxa.localhorst.home:9010" \
  43. --env "FXA_PROFILE_URL=https://fxa.localhorst.home:1111" \
  44. --env "SYNC_TOKENSERVER_URL=https://fxa.localhorst.home:5000/token" \
  45. --env "FXA_URL=https://fxa.localhorst.home:9000" \
  46. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  47. --env "GEODB_ENABLED=false" \
  48. --env "CSP_ENABLED=false" \
  49. --env "REDIRECT_PORT=3031" \
  50. --add-host="fxa.localhorst.home:192.168.0.2" \
  51. fxa-content-server:latest
  52.  
  53. echo
  54. echo "Sleeping 5 sec. to let services come up before linking"
  55. echo
  56. sleep 5
  57.  
  58. docker run --detach --rm --name sync \
  59. --env "SYNCSERVER_PUBLIC_URL=https://fxa.localhorst.home:5000" \
  60. --env "SYNCSERVER_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  61. --env "SYNCSERVER_SQLURI=pymysql://xxxxxxxx:xxxxxxxx@172.17.0.1/fxa_sync" \
  62. --env "SYNCSERVER_IDENTITY_PROVIDER=https://fxa.localhorst.home:3030" \
  63. --env "SYNCSERVER_BROWSERID_VERIFIER=https://fxa.localhorst.home:5050/v2" \
  64. --env "SYNCSERVER_BATCH_UPLOAD_ENABLED=true" \
  65. --env "SYNCSERVER_ALLOW_NEW_USERS=true" \
  66. --env "SYNCSERVER_FORCE_WSGI_ENVIRON=true" \
  67. --env "REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt" \
  68. fxa-syncserver:latest
  69.  
  70. docker run --detach --rm --name auth \
  71. --env "IP_ADDRESS=0.0.0.0" \
  72. --env "REDIS_HOST=172.17.0.1" \
  73. --env "GEODB_ENABLED=false" \
  74. --env "SMTP_HOST=mxxxxxxxxx" \
  75. --env "SMTP_USER=xxxxxxxxxxxx" \
  76. --env "SMTP_PORT=465" \
  77. --env "SMTP_SECURE=true" \
  78. --env "SMTP_PASS=xxxxxxxxxxxxx" \
  79. --env "SMTP_SENDER=Firefox Accounts Server <xxxxxxxxxxx>" \
  80. --env "PUBLIC_URL=https://fxa.localhorst.home:9000" \
  81. --env "HTTPDB_URL=https://fxa.localhorst.home:8000" \
  82. --env "CONTENT_SERVER_URL=https://fxa.localhorst.home:3030" \
  83. --env "OAUTH_URL=https://fxa.localhorst.home:9010" \
  84. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  85. --add-host="fxa.localhorst.home:192.168.0.2" \
  86. fxa-auth-server:latest
  87.  
  88. docker run --detach --rm --name oauth \
  89. --env "GEODB_ENABLED=false" \
  90. --env "HOST=0.0.0.0" \
  91. --env "PUBLIC_URL=https://fxa.localhorst.home:9010" \
  92. --env "CONTENT_URL=https://fxa.localhorst.home:3030/oauth" \
  93. --env "VERIFICATION_URL=https://fxa.localhorst.home:5050/v2" \
  94. --env "ISSUER=fxa.localhorst.home:9000" \
  95. --env "DB=mysql" \
  96. --env "MYSQL_HOST=172.17.0.1" \
  97. --env "MYSQL_PASSWORD=xxxxxxxx" \
  98. --env "NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/hsp_root_cert.crt" \
  99. --add-host="fxa.localhorst.home:192.168.0.2" \
  100. --entrypoint npm \
  101. fxa-oauth-server:latest run start-oauth
  102.  
  103. echo
  104. echo "Sleeping 5 sec. to let services come up before linking"
  105. echo
  106. sleep 5
  107. echo
  108. echo Setting up proxy
  109.  
  110. docker run --detach --rm --name proxy \
  111. --link="profile" \
  112. --link="content" \
  113. --link="sync" \
  114. --link="verifier" \
  115. --link="httpdb" \
  116. --link="auth" \
  117. --link="oauth" \
  118. --publish 1111:1111 \
  119. --publish 3030:3030 \
  120. --publish 5000:5000 \
  121. --publish 5050:5050 \
  122. --publish 8000:8000 \
  123. --publish 9000:9000 \
  124. --publish 9010:9010 \
  125. --add-host="fxa.localhorst.home:192.168.0.2" \
  126. fxa-self-hosting:latest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement