docker-compose.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. # format 3.x, validated on W10 - there is no "mode/uid/gid" for docker-compose 1.29/W10
  2. # you should provide your private/public RSA key in ./ssh dir (named id_rsa.mpi/id_rsa.mpi.pub)
  3. # docker swarm init, then you have to do // note version_mpinet is the name of the overlay
  4. # docker network create --driver=overlay --attachable yml_mpinet
  5. # with xmp and telegraf
  6. # Jan, 09, 2025 - Jean-Michel Batto
  7. services:
  8. grafana:
  9. container_name: influxdb_local
  10. image: philhawthorne/docker-influxdb-grafana:latest
  11. volumes:
  12. - /var/run/docker.sock:/var/run/docker.sock
  13. - usrlocalinfluxdb-foo:/var/lib/influxdb
  14. - usrlocalgrafana-foo:/var/lib/grafana
  15. ports:
  16. - "3003:3003"
  17. - "3004:8083"
  18. - "8086:8086"
  19. networks:
  20. - mpinet
  21. mpihead:
  22. image: jmbatto/m2chps-mpi41-xmp:latest
  23. hostname: mpihead
  24. volumes:
  25. - /var/run/docker.sock:/var/run/docker.sock
  26. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  27. shm_size: '512m'
  28. ports:
  29. - "2022:22"
  30. links:
  31. - mpinode1
  32. - mpinode2
  33. - mpinode3
  34. networks:
  35. - mpinet
  36. secrets:
  37. - source: "id_rsa"
  38. target: "/home/mpiuser/.ssh-source/id_rsa"
  39. - source: "id_rsa_mpi_pub"
  40. target: "/home/mpiuser/.ssh-source/id_rsa.pub"
  41. - source: "authorized_keys"
  42. target: "/home/mpiuser/.ssh-source/authorized_keys"
  43. - source: "install_clang_format_go.sh"
  44. target: "/home/mpiuser/.ssh-source/install_clang_format_go.sh"
  45. depends_on:
  46. - grafana
  47. mpinode1:
  48. image: jmbatto/m2chps-mpi41-xmp:latest
  49. hostname: mpinode1
  50. volumes:
  51. - /var/run/docker.sock:/var/run/docker.sock
  52. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  53. shm_size: '512m'
  54. networks:
  55. - mpinet
  56. secrets:
  57. - source: "id_rsa"
  58. target: "/home/mpiuser/.ssh-source/id_rsa"
  59. - source: "id_rsa_mpi_pub"
  60. target: "/home/mpiuser/.ssh-source/id_rsa.pub"
  61. - source: "authorized_keys"
  62. target: "/home/mpiuser/.ssh-source/authorized_keys"
  63. depends_on:
  64. - grafana
  65. mpinode2:
  66. image: jmbatto/m2chps-mpi41-xmp:latest
  67. hostname: mpinode2
  68. volumes:
  69. - /var/run/docker.sock:/var/run/docker.sock
  70. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  71. shm_size: '512m'
  72. networks:
  73. - mpinet
  74. secrets:
  75. - source: "id_rsa"
  76. target: "/home/mpiuser/.ssh-source/id_rsa"
  77. - source: "id_rsa_mpi_pub"
  78. target: "/home/mpiuser/.ssh-source/id_rsa.pub"
  79. - source: "authorized_keys"
  80. target: "/home/mpiuser/.ssh-source/authorized_keys"
  81. depends_on:
  82. - grafana
  83. mpinode3:
  84. image: jmbatto/m2chps-mpi41-xmp:latest
  85. hostname: mpinode3
  86. volumes:
  87. - /var/run/docker.sock:/var/run/docker.sock
  88. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  89. shm_size: '512m'
  90. networks:
  91. - mpinet
  92. secrets:
  93. - source: "id_rsa"
  94. target: "/home/mpiuser/.ssh-source/id_rsa"
  95. - source: "id_rsa_mpi_pub"
  96. target: "/home/mpiuser/.ssh-source/id_rsa.pub"
  97. - source: "authorized_keys"
  98. target: "/home/mpiuser/.ssh-source/authorized_keys"
  99. depends_on:
  100. - grafana
  101. vscode:
  102. image: codercom/code-server:latest
  103. container_name: vscode
  104. hostname: vscode
  105. ports:
  106. - "8081:8080"
  107. deploy:
  108. resources:
  109. limits:
  110. memory: 512M
  111. restart: always
  112. volumes:
  113. - /var/run/docker.sock:/var/run/docker.sock
  114. - usrlocalvarmpi-foo:/usr/local/var/mpishare
  115. environment:
  116. - PASSWORD=XXXXXXXX
  117. - DOCKER_USER=votrelogin
  118. - CODER_ACCESS_URL="http://localhost:8081"
  119. user: "1001:1001"
  120. networks:
  121. - mpinet
  122. secrets:
  123. - source: "id_rsa"
  124. target: "/home/coder/.ssh-source/id_rsa"
  125. - source: "id_rsa_mpi_pub"
  126. target: "/home/coder/.ssh-source/id_rsa.pub"
  127. - source: "authorized_keys"
  128. target: "/home/coder/.ssh-source/authorized_keys"
  129. - source: "certif.sh"
  130. target: "/home/coder/.ssh-source/certif.sh"
  131. - source: "install_clang_format_go.sh"
  132. target: "/home/coder/.ssh-source/install_clang_format_go.sh"
  133. secrets:
  134. id_rsa_mpi_pub:
  135. file: ssh/id_rsa.mpi.pub
  136. id_rsa:
  137. file: ssh/id_rsa.mpi
  138. authorized_keys:
  139. file: ssh/id_rsa.mpi.pub
  140. certif.sh:
  141. file: ssh/certif.sh
  142. install_clang_format_go.sh:
  143. file: ssh/install_clang_format_go.sh
  144. networks:
  145. mpinet:
  146. external: true
  147. name : yml_mpinet
  148. driver: overlay
  149. volumes:
  150. usrlocalvarmpi-foo:
  151. usrlocalgrafana-foo:
  152. usrlocalinfluxdb-foo: