docker-compose.yaml 721 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. version: "3.7"
  2. services:
  3. db:
  4. image: mysql:8.0.19
  5. command: '--default-authentication-plugin=mysql_native_password'
  6. restart: always
  7. secrets:
  8. - db-password
  9. volumes:
  10. - db-data:/var/lib/mysql
  11. networks:
  12. - backnet
  13. environment:
  14. - MYSQL_DATABASE=example
  15. - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
  16. backend:
  17. build: backend
  18. restart: always
  19. secrets:
  20. - db-password
  21. ports:
  22. - 5000:5000
  23. networks:
  24. - backnet
  25. - frontnet
  26. proxy:
  27. build: proxy
  28. restart: always
  29. ports:
  30. - 80:80
  31. networks:
  32. - frontnet
  33. volumes:
  34. db-data:
  35. secrets:
  36. db-password:
  37. file: db/password.txt
  38. networks:
  39. backnet:
  40. frontnet: