Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

docker-compose.yml.example 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. version: "3.6"
  2. services:
  3. mysql-db:
  4. image: mysql:5.7
  5. container_name: mysql-db-MAIN_DOMAIN_NAME
  6. ports:
  7. - "3306:3306"
  8. volumes:
  9. - ./config/sql/:/docker-entrypoint-initdb.d/
  10. - MAIN_DOMAIN_NAME-mysql-volume:/var/lib/mysql
  11. environment:
  12. # root user is automatically created
  13. MYSQL_ROOT_PASSWORD: password
  14. MYSQL_USER: user
  15. MYSQL_PASSWORD: password
  16. networks:
  17. - backend
  18. mongo:
  19. image : mongo
  20. container_name: mongo
  21. environment:
  22. MONGO_INITDB_ROOT_USERNAME: root
  23. MONGO_INITDB_ROOT_PASSWORD: password
  24. ports:
  25. - "27017:27017"
  26. volumes:
  27. - mongo_data_container:/data/db
  28. networks:
  29. - backend
  30. MAIN_DOMAIN_NAME:
  31. build:
  32. context: .
  33. dockerfile: ./docker-image/${DOCKERFILE}
  34. args:
  35. node_version: ${NODE_VERSION}
  36. php_version: ${PHP_VERSION}
  37. hostname: MAIN_DOMAIN_NAME.docker
  38. container_name: MAIN_DOMAIN_NAME
  39. extra_hosts:
  40. - "MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  41. - "api.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  42. - "contentengine.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  43. - "blog.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  44. - "mongoexpress.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  45. - "adminer.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  46. env_file:
  47. - .run.env
  48. environment:
  49. - LOCALDEV_UID=${LOCALDEV_UID}
  50. - LOCALDEV_GID=${LOCALDEV_GID}
  51. # to prevent conflicts with portainer set the xdebug port to 9003
  52. - XDEBUG_CONFIG=remote_host=MAIN_DOMAIN_NAME.docker remote_port=9003 remote_enable=1 remote_autostart=1 default_enable=1 idekey=VSCODE remote_connect_back=1
  53. ports:
  54. - 80:80
  55. - 443:443
  56. volumes:
  57. - ${REPOS_FOLDER}/phpapi-example/:/var/www/MAIN_DOMAIN_NAME-api/:cached
  58. - ${REPOS_FOLDER}/phpwebsite-example/:/var/www/MAIN_DOMAIN_NAME-website/:cached
  59. - ${REPOS_FOLDER}/strapi-example/:/var/www/MAIN_DOMAIN_NAME-contentengine/:cached
  60. - ${REPOS_FOLDER}/gatsbyblog-example/:/var/www/MAIN_DOMAIN_NAME-blog/:cached
  61. - ${REPOS_FOLDER}/mongoexpress-example/:/var/www/MAIN_DOMAIN_NAME-mongoexpress/:cached
  62. - ./config/nginx:/etc/nginx/conf.d:cached
  63. - ./config/apache.conf:/etc/apache2/sites-available/000-default.conf:cached
  64. - ./config/php.ini:/usr/local/etc/php/php.ini:cached
  65. - ./docker-image/adminer_index.php:/var/www/adminer/index.php:cached
  66. - type: bind
  67. source: ./config/
  68. target: /config_items/
  69. - ${HOME_SSH}:/var/www/.ssh/
  70. - ./config/.bashrc:/var/www/.bashrc:cached
  71. links:
  72. # the host name used in apache or nginx vhost file will be mongoexpress.MAIN_DOMAIN_NAME.localhost
  73. - "mongoexpress:mongoexpress"
  74. depends_on:
  75. - mysql-db
  76. networks:
  77. - backend
  78. mongoexpress:
  79. build:
  80. context: .
  81. dockerfile: ./docker-image/Dockerfile_mongoexpress
  82. container_name: mongoexpress
  83. ports:
  84. - 3001:3001
  85. volumes:
  86. - ${REPOS_FOLDER}/mongoexpress-example/:/src/app
  87. networks:
  88. - backend
  89. depends_on:
  90. - mongo
  91. portainer:
  92. image: portainer/portainer
  93. container_name: portainer-MAIN_DOMAIN_NAME
  94. volumes:
  95. - portainer-data:/data
  96. - /var/run/docker.sock:/var/run/docker.sock
  97. ports:
  98. - 8001:8000
  99. - 9001:9000
  100. networks:
  101. - agent_network
  102. volumes:
  103. MAIN_DOMAIN_NAME-mysql-volume:
  104. portainer-data:
  105. mongo_data_container:
  106. networks:
  107. backend:
  108. agent_network: