docker-compose-all.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. version: "3"
  2. services:
  3. # MySQL mariadb
  4. mysql:
  5. image: mariadb
  6. restart: unless-stopped
  7. volumes:
  8. - ./mysql/init-coturn-db.sql:/docker-entrypoint-initdb.d/init-coturn-db.sql:ro
  9. - ./mysql/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
  10. - mysql-data:/var/lib/mysql
  11. env_file:
  12. - mysql/mysql.env
  13. networks:
  14. - backend
  15. # PostgreSQL
  16. postgresql:
  17. image: postgres
  18. restart: unless-stopped
  19. volumes:
  20. - ./postgresql/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
  21. - postgresql-data:/var/lib/postgresql
  22. env_file:
  23. - postgresql/postgresql.env
  24. networks:
  25. - backend
  26. # Redis
  27. redis:
  28. image: redis
  29. restart: unless-stopped
  30. command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
  31. volumes:
  32. - ./redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
  33. - redis-data:/data
  34. env_file:
  35. - redis/redis.env
  36. networks:
  37. - backend
  38. # MongoDB
  39. mongodb:
  40. image: mongo
  41. restart: unless-stopped
  42. volumes:
  43. - mongodb-data:/data/db
  44. env_file:
  45. - mongodb/mongodb.env
  46. networks:
  47. - backend
  48. # Coturn
  49. coturn:
  50. build:
  51. context: ../
  52. dockerfile: ./docker/coturn/debian/Dockerfile
  53. restart: always
  54. volumes:
  55. - ./coturn/turnserver.conf:/etc/turnserver.conf:ro
  56. - ./coturn/privkey.pem:/etc/ssl/private/privkey.pem:ro
  57. - ./coturn/cert.pem:/etc/ssl/certs/cert.pem:ro
  58. ports:
  59. ## STUN/TURN
  60. - "3478:3478"
  61. - "3478:3478/udp"
  62. - "3479:3479"
  63. - "3479:3479/udp"
  64. - "80:80"
  65. - "80:80/udp"
  66. ## STUN/TURN SSL
  67. - "5349:5349"
  68. - "5349:5349/udp"
  69. - "5350:5350"
  70. - "5350:5350/udp"
  71. - "443:443"
  72. - "443:443/udp"
  73. # Relay Ports
  74. # - "49152-65535:49152-65535"
  75. # - "49152-65535:49152-65535/udp"
  76. networks:
  77. - frontend
  78. - backend
  79. depends_on:
  80. - mysql
  81. - postgresql
  82. - redis
  83. - mongodb
  84. env_file:
  85. - coturn/coturn.env
  86. # DB
  87. - mysql/mysql.env
  88. - postgresql/postgresql.env
  89. - redis/redis.env
  90. - mongodb/mongodb.env
  91. volumes:
  92. mysql-data:
  93. postgresql-data:
  94. redis-data:
  95. mongodb-data:
  96. networks:
  97. frontend:
  98. driver: bridge
  99. ipam:
  100. driver: default
  101. config:
  102. - subnet: 172.16.238.0/24
  103. backend:
  104. internal: true