docker-compose.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. version: "3.8"
  2. services:
  3. mysql:
  4. image: mariadb:latest
  5. volumes:
  6. - db-data:/var/lib/mysql
  7. - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
  8. - ./Docker/mysql/bashrc:/root/.bashrc:ro
  9. - "${DB_IMPORTE_FILE}:/docker-entrypoint-initdb.d/enfrancais.sql"
  10. networks:
  11. - database
  12. hostname: mysql
  13. environment:
  14. MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
  15. MYSQL_DATABASE: "${DB_NAME}"
  16. MYSQL_USER: "${DB_USERNAME}"
  17. MYSQL_PASSWORD: "${DB_PASSWORD}"
  18. redis:
  19. image: redis:4
  20. command: ["redis-server", "--appendonly", "yes"]
  21. volumes:
  22. - redis-data:/data
  23. networks:
  24. - redis
  25. ports:
  26. - "6389"
  27. php:
  28. build: ./Docker/php/
  29. expose:
  30. - 9000
  31. user: ${USER_UID}:${USER_GID}
  32. volumes:
  33. - php-user-data:/home/${USER_UNAME}
  34. - "${API_ROOT}:/var/www/html/api"
  35. - "${LOG_ROOT}/php:/var/log:rw"
  36. working_dir: "/var/www/html/api/src"
  37. networks:
  38. - database
  39. - redis
  40. - server
  41. depends_on:
  42. - mysql
  43. - redis
  44. phpmyadmin:
  45. image: phpmyadmin/phpmyadmin
  46. ports:
  47. - 8991:80
  48. networks:
  49. - database
  50. depends_on:
  51. - mysql
  52. environment:
  53. PMA_HOSTS: mysql,mysql-legacy
  54. nginx:
  55. build: ./Docker/nginx/
  56. ports:
  57. - 8990:80
  58. volumes:
  59. - "${API_ROOT}:/var/www/html/api"
  60. - "${APP_ROOT}:/var/www/html/app"
  61. - "${LOG_ROOT}:/var/log:rw"
  62. working_dir: "/var/www/html/api/"
  63. networks:
  64. - server
  65. depends_on:
  66. - php
  67. # app:
  68. # build: ./Docker/app
  69. # user: ${USER_UID}:${USER_GID}
  70. # volumes:
  71. # - "${APP_ROOT}:/app"
  72. # - npm-user-data:/home/${USER_UNAME}
  73. # ports:
  74. # - 8988:8988
  75. # working_dir: "/app"
  76. # environment:
  77. # - APP_ENV=dev
  78. volumes:
  79. php-user-data:
  80. db-data:
  81. redis-data:
  82. # npm-user-data:
  83. networks:
  84. database:
  85. redis:
  86. server: