You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

docker-compose.yml.example 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. version: "3.6"
  2. services:
  3. MAIN_DOMAIN_NAME:
  4. image: MAIN_DOMAIN_NAME
  5. build:
  6. context: .
  7. dockerfile: ./docker-image/${DOCKERFILE}
  8. hostname: MAIN_DOMAIN_NAME.docker
  9. container_name: MAIN_CONTAINER_NAME
  10. extra_hosts:
  11. - "api.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  12. - "MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  13. - "blog.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  14. - "adminer.MAIN_DOMAIN_NAME.localhost:127.0.0.1"
  15. env_file:
  16. - .run.env
  17. environment:
  18. - LOCALDEV_UID=${LOCALDEV_UID}
  19. - LOCALDEV_GID=${LOCALDEV_GID}
  20. # to prevent conflicts with portainer set the xdebug port to 9003
  21. - 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
  22. ports:
  23. - 80:80
  24. - 443:443
  25. volumes:
  26. - ${REPOS_FOLDER}/example-api/:/var/www/MAIN_DOMAIN_NAME-api/:cached
  27. - ${REPOS_FOLDER}/example-website/:/var/www/MAIN_DOMAIN_NAME-website/:cached
  28. - ${REPOS_FOLDER}/example-blog/:/var/www/MAIN_DOMAIN_NAME-blog/:cached
  29. - ./config/apache.conf:/etc/apache2/sites-available/000-default.conf:cached
  30. - ./config/php.ini:/usr/local/etc/php/php.ini:cached
  31. - ./docker-image/adminer_index.php:/var/www/adminer/index.php:cached
  32. - type: bind
  33. source: ./config/
  34. target: /config_items/
  35. - ${HOME_SSH}:/var/www/.ssh/
  36. - ./config/.bashrc:/var/www/.bashrc:cached
  37. depends_on:
  38. - mysql-db
  39. networks:
  40. - backend
  41. mongo:
  42. image: mongo:4.2.8
  43. ports:
  44. - 27017:27017
  45. volumes:
  46. - mongodb:/data/db
  47. - mongodb_config:/data/configdb
  48. volumes:
  49. mongodb:
  50. mongodb_config:
  51. networks:
  52. - backend
  53. mysql-db:
  54. image: mysql:5.7
  55. container_name: mysql-db-MAIN_CONTAINER_NAME
  56. ports:
  57. - "3306:3306"
  58. volumes:
  59. - ./config/sql/:/docker-entrypoint-initdb.d/
  60. - pslamp-mysql-volume:/var/lib/mysql
  61. environment:
  62. MYSQL_ROOT_PASSWORD: password
  63. MYSQL_USER: pslamp_user
  64. MYSQL_PASSWORD: password
  65. networks:
  66. - backend
  67. portainer:
  68. image: portainer/portainer
  69. container_name: portainer-MAIN_CONTAINER_NAME
  70. volumes:
  71. - portainer-data:/data
  72. - /var/run/docker.sock:/var/run/docker.sock
  73. ports:
  74. - 8001:8000
  75. - 9001:9000
  76. networks:
  77. - agent_network
  78. volumes:
  79. pslamp-mysql-volume:
  80. portainer-data:
  81. networks:
  82. backend:
  83. agent_network: