Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. version: '3.3'
  2. services:
  3. db:
  4. image: mysql:5.7
  5. restart: always
  6. environment:
  7. MYSQL_DATABASE: 'db'
  8. # So you don't have to use root, but you can if you like
  9. MYSQL_USER: 'user'
  10. # You can use whatever password you like
  11. MYSQL_PASSWORD: 'secret'
  12. # Password for root access
  13. MYSQL_ROOT_PASSWORD: 'secret'
  14. ports:
  15. # <Port exposed> : < MySQL Port running inside container>
  16. - '3306:3306'
  17. expose:
  18. # Opens port 3306 on the container
  19. - '3306'
  20. # Where our data will be persisted
  21. volumes:
  22. - my-db:/var/lib/mysql
  23. # Names our volume
  24. volumes:
  25. my-db:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement