Advertisement
Guest User

Untitled

a guest
Nov 27th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. version: '3'
  2. services:
  3.  
  4. mysql:
  5. image: mysql:5.7
  6. volumes:
  7. - ./data:/var/lib/mysql
  8. environment:
  9. MYSQL_ROOT_PASSWORD: "rootpwd"
  10. MYSQL_USER: 'testuser'
  11. MYSQL_PASSWORD: 'testpassword'
  12.  
  13. adminer:
  14. image: adminer
  15. restart: always
  16. ports:
  17. - 8080:8080
  18. links:
  19. - mysql:db
  20.  
  21. volumes:
  22. mysql:
  23.  
  24. # This file defines all environment variables that the application needs.
  25. # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE.
  26. # Use ".env.local" for local overrides during development.
  27. # Use real environment variables when deploying to production.
  28. # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
  29.  
  30. ###> symfony/framework-bundle ###
  31. APP_ENV=dev
  32. APP_SECRET=825aa371242c34bdcc0c693ac4241bcf
  33. #TRUSTED_PROXIES=127.0.0.1,127.0.0.2
  34. #TRUSTED_HOSTS='^localhost|example.com$'
  35. ###< symfony/framework-bundle ###
  36.  
  37. ###> doctrine/doctrine-bundle ###
  38. # Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
  39. # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
  40. # Configure your db driver and server_version in config/packages/doctrine.yaml
  41. DATABASE_URL=mysql://testuser:testpassword@127.0.0.1:3306/dbname
  42.  
  43. ###< doctrine/doctrine-bundle ###
  44.  
  45. parameters:
  46. # Adds a fallback DATABASE_URL if the env var is not set.
  47. # This allows you to run cache:warmup even if your
  48. # environment variables are not available yet.
  49. # You should not need to change this value.
  50. #env(DATABASE_URL): ''
  51.  
  52. doctrine:
  53. dbal:
  54. # configure these for your database server
  55. driver: 'pdo_mysql'
  56. server_version: '5.7'
  57. charset: utf8mb4
  58. default_table_options:
  59. charset: utf8mb4
  60. collate: utf8mb4_unicode_ci
  61.  
  62. url: '%env(resolve:DATABASE_URL)%'
  63. unix_socket: /tmp/mysql.sock
  64. orm:
  65. auto_generate_proxy_classes: true
  66. naming_strategy: doctrine.orm.naming_strategy.underscore
  67. auto_mapping: true
  68.  
  69. mappings:
  70. App:
  71. is_bundle: false
  72. type: annotation
  73. dir: '%kernel.project_dir%/src/Entity'
  74. prefix: 'AppEntity'
  75. alias: App
  76.  
  77. version: '3'
  78. services:
  79.  
  80. mysql:
  81. image: mysql:5.7
  82. volumes:
  83. - ./data:/var/lib/mysql
  84. environment:
  85. MYSQL_ROOT_PASSWORD: "rootpwd"
  86. MYSQL_USER: 'testuser'
  87. MYSQL_PASSWORD: 'testpassword'
  88. ports:
  89. - 3306:3306
  90. adminer:
  91. image: adminer
  92. restart: always
  93. ports:
  94. - 8080:8080
  95. links:
  96. - mysql:db
  97.  
  98. volumes:
  99. mysql:
  100.  
  101. DATABASE_URL=mysql://testuser:testpassword@127.0.0.1:3306/dbname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement