Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. version: '3.1'
  2. services:
  3. mysql:
  4. image: mysql
  5. container_name: mysql
  6. command: --default-authentication-plugin=mysql_native_password
  7. restart: always
  8. environment:
  9. MYSQL_DATABASE: seemode-db
  10. MYSQL_USER: See-Mode-Admin
  11. MYSQL_PASSWORD: Pa55word!
  12. MYSQL_ROOT_PASSWORD: root-password
  13. volumes:
  14. - my-datavolume:/var/lib/mysql
  15. networks:
  16. - proxy_net
  17. ports:
  18. - '3306:3306'
  19. redis:
  20. image: redis
  21. container_name: redis
  22. networks:
  23. - proxy_net
  24. ports:
  25. - '6379:6379'
  26. frontend:
  27. image: mrdaniel123/see-mode-frontend
  28. container_name: frontend
  29. networks:
  30. - proxy_net
  31. ports:
  32. - '3000:80'
  33. environment:
  34. - HOST=0.0.0.0
  35. backend:
  36. image: mrdaniel123/see-mode-backend
  37. container_name: see-mode-backend
  38. ports: ['8000:8000', '80:80']
  39. expose: ['8000']
  40. command: >
  41. /bin/bash -c "
  42. while ! nc -z redis 6379;
  43. do
  44. echo Waiting for Redis;
  45. sleep 1;
  46. done;
  47. echo Connected to redis!;
  48. while ! nc -z mysql 3306;
  49. do
  50. echo Waiting for MySql;
  51. sleep 1;
  52. done;
  53. echo Connected to mysql!;
  54. echo Allowing time for DB initialization...;
  55. sleep 15
  56. echo Running startup!;
  57. chmod +x startup.local.sh
  58. ./startup.local.sh
  59. "
  60. depends_on:
  61. - redis
  62. - mysql
  63. environment:
  64. - ENV=LOCALDEPLOY
  65. - VIRTUAL_HOST=dev-backend.see-mode.com
  66. - VIRTUAL_PORT=8000
  67. - DJANGO_SETTINGS_MODULE=seemodeserver.settings_local
  68. - STAGING_ENV=True
  69. networks:
  70. - proxy_net
  71. worker:
  72. image: mrdaniel123/see-mode-worker
  73. container_name: see-mode-worker
  74. command: >
  75. /bin/bash -c "
  76. while ! nc -z redis 6379;
  77. do
  78. echo Waiting for Redis;
  79. sleep 1;
  80. done;
  81. echo Connected to redis!;
  82. echo Allowing time for Redis Queue initialization...;
  83. sleep 30
  84. echo Running startup!;
  85. chmod +x startup.sh
  86. ./startup.sh
  87. "
  88. depends_on:
  89. - redis
  90. - backend
  91. environment:
  92. - ENV=LOCALDEPLOY
  93. - STAGING_ENV=FALSE
  94. networks:
  95. - proxy_net
  96. volumes:
  97. my-datavolume:
  98. networks:
  99. proxy_net:
  100. driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement