Advertisement
Guest User

Untitled

a guest
Nov 30th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. version: '2.1'
  2.  
  3. services:
  4. web:
  5. image: sileax/docker-front-devops-estiam:prod
  6. ports:
  7. - "32111:80"
  8. depends_on:
  9. nodeapi:
  10. condition: service_healthy
  11. nodeapi:
  12. image: sileax/api-devops:prod
  13. ports:
  14. - "31213:31213"
  15. environment:
  16. - NODE_ENV=production_postgres
  17. healthcheck:
  18. test: ["CMD", "curl", "-f", "http://localhost:31213/users"]
  19. interval: 30s
  20. timeout: 10s
  21. retries: 3
  22. depends_on:
  23. mysql:
  24. condition: service_healthy
  25. postgres:
  26. condition: service_healthy
  27. mysql:
  28. image: mysql:5.7.22
  29. ports:
  30. - "3306:3306"
  31. environment:
  32. - MYSQL_ROOT_PASSWORD=myrootpassword
  33. - MYSQL_DATABASE=database_production
  34. - MYSQL_USER=quasar
  35. - MYSQL_PASSWORD=quasar
  36. healthcheck:
  37. test: mysql -uquasar -pquasar database_production -e "SELECT 1"
  38. timeout: 40s
  39. retries: 10
  40. volumes:
  41. - ./mysql-volume:/var/lib/mysql
  42. postgres:
  43. image: postgres:10.4-alpine
  44. ports:
  45. - "5432:5432"
  46. environment:
  47. - POSTGRES_PASSWORD=myrootpassword
  48. - POSTGRES_DB=database_production
  49. - POSTGRES_USER=root
  50. healthcheck:
  51. test: PGPASSWORD=myrootpassword psql -U root -d database_production -c "SELECT 1"
  52. timeout: 40s
  53. retries: 10
  54. volumes:
  55. - postgre-volume:/var/lib/postgresql/data
  56. volumes:
  57. mysql-volume:
  58. postgre-volume:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement